Here's why:
* Sodium (Na) is a metal in group 1 of the periodic table, meaning it has a single valence electron it readily loses to become a positively charged ion (Na+).
* Fluorine (F) is a nonmetal in group 17, meaning it has seven valence electrons and readily gains one electron to become a negatively charged ion (F-).
When sodium and fluorine react, sodium loses its electron, and fluorine gains it. This results in an ionic bond, where the positively charged sodium ion and the negatively charged fluoride ion are attracted to each other, forming sodium fluoride (NaF).
Sodium fluoride is a white, crystalline solid that is commonly used in toothpaste to prevent cavities.