Why would chlorine and two atoms of sodium reacts to make an ionic compounds?
Chlorine is a nonmetal and sodium is a metal, so they undergo a transfer of electrons to achieve stable electron configurations. The chlorine gains an electron from each sodium atom to form chloride ions, while the sodium atoms lose an electron each to form sodium ions. The attraction between these oppositely charged ions forms an ionic bond in the compound sodium chloride.