Answer:
The formation of magnesium chloride, MgCl2, is another example of ionic bonding. When magnesium reacts with chlorine, a magnesium atom loses two electrons and becomes a positively charged ion, Mg2+. At the same time, two chlorine atoms gain one electron each and become negatively charged chloride ions, Cl−.