Final answer:
Sodium, with one valence electron, donates it to chlorine, which has seven valence electrons, to form NaCl. This reaction follows the octet rule, resulting in the formation of a stable Na+ cation and Cl- anion, which are held together by an ionic bond.
Step-by-step explanation:
The reaction between sodium and chlorine to form NaCl is determined by their valence electrons. Sodium has a single valence electron, while chlorine has seven. When they react, sodium donates its one valence electron to chlorine—a process driven by the elements' desires to achieve a stable electron configuration resembling the noble gases, referred to as the octet rule.
This transfer transforms sodium into a positively charged ion (Na+), because it now has more protons than electrons. Similarly, chlorine becomes a negatively charged ion (Cl-), since it has more electrons than protons, after accepting an electron. These oppositely charged ions attract each other creating an ionic bond, resulting in the formation of sodium chloride (NaCl), where the overall net charge of the compound is zero.