The fish ate the worm . *It* was tasty.

Do "It" and "the worm" mean the same thing?
yes