Answer:
See explanation below
Step-by-step explanation:
Sodium will react with chlorine to form sodium chloride NaCl.
Na is a group I metal with 1 valance electron to become one Na+ ion to bond with one Cl- ion
Magnesium will also react with chlorine to form magnesium chloride MgCl2
Mg is a group II metal with 2 valence electrons become one Mg2+ ion to bond with two Cl- ions.
Both Na and Mg are metals while Cl is non-metals so the bond between metal and non-metal is ionic bond.
Hope this helps.