Here's why:
* Salt (NaCl) is an ionic compound formed by the electrostatic attraction between positively charged sodium ions (Na+) and negatively charged chloride ions (Cl-).
* Chlorine (Cl) is a nonmetal and has a tendency to gain one electron to achieve a stable electron configuration like that of the noble gas argon.
* Gaining an electron gives the chlorine atom a negative charge, making it a chloride ion (Cl-).