* Sodium (Na) is a metal and has one valence electron (electron in its outermost shell). Metals tend to lose electrons to achieve a stable electron configuration.
* Chlorine (Cl) is a nonmetal and has seven valence electrons. Nonmetals tend to gain electrons to achieve a stable electron configuration.
When sodium reacts with chlorine, sodium loses its valence electron, becoming a positively charged ion (Na+). Chlorine gains that electron, becoming a negatively charged ion (Cl-). These oppositely charged ions are then attracted to each other, forming an ionic bond and creating sodium chloride (NaCl), also known as table salt.