Answer: Metals are cations and have a lower electronegativity and ionization energy than nonmetals. For nonmetals they are anions and have higher electronegativities and ionization energy the energy required to remove an electron.
Explanation: Nonmetals have more electrons in their valence shell making them more electronegative than metals. Metals donate their outer electron/s since nonmetals have high ionization energy.
For the example Na transfers its 1 electron to bromine making them both in octet.