Sodium (\( Na \), atomic number 11) has one electron in its outermost shell and readily loses it to attain a stable noble gas configuration (\( \text{Na}^+ \)). Chlorine (\( Cl \), atomic number 17) has seven valence electrons and gains an electron to complete its octet, forming (\( \text{Cl}^- \)). The electrostatic attraction between \( \text{Na}^+ \) and \( \text{Cl}^- \) forms an ionic bond, creating sodium chloride (\( NaCl \)).