Sodium (Na) has an electron configuration of 1s2 2s2 2p6 3s1, and it combines with fluorine (F) to form sodium fluoride (NaF) with the chemical formula NaF.
When sodium loses an electron, it becomes a positively charged ion with a configuration of 1s2 2s2 2p6, which is the same electron configuration as neon (Ne), a noble gas.
Fluorine gains an electron to form a negatively charged ion with a configuration of 1s2 2s2 2p6, which is the same as that of a noble gas configuration of neon.
Therefore, after sodium loses an electron and fluorine gains an electron, both atoms have the same electron configuration as neon, which is a stable configuration.