The correct answer is B. The sodium transfers one electron to the fluorine to fulfill the octet rule.
In sodium fluoride (NaF), sodium (Na) has one electron in its outer shell and tends to lose that electron to achieve a stable electron configuration, resembling that of the noble gases. Meanwhile, fluorine (F) has seven electrons in its outer shell and requires one more electron to complete its octet. When sodium loses an electron, it becomes a positively charged ion (Na⁺), and when fluorine gains that electron, it becomes a negatively charged ion (F⁻). The electrostatic attraction between these oppositely charged ions forms the ionic bond in sodium fluoride.