Ionic bonding occurs when there is a complete transfer of electrons from one atom to another. In the case of ZnCl2, the zinc atom loses two electrons to each of the two chlorine atoms, resulting in the formation of positively charged zinc ions (Zn2+) and negatively charged chloride ions (Cl-).
The electrostatic attraction between the positively charged zinc ions and the negatively charged chloride ions holds the compound together, forming an ionic bond. Zinc chloride is, therefore, an example of an ionic compound.