Step-by-step explanation:
Alkali metals: Lithium, sodium, potassium, rubidium, cesium, and francium.
Alkaline earth metals: Beryllium, magnesium, calcium, strontium, barium, and radium.
These metals tend to lose their outer electrons.
-------
Furthermore, nonmetals like nitrogen, oxygen, and chlorine tend to gain electrons.
According to the picture on the question tab:
Chlorine gains 1 electron
Nitrogen gains 3 electrons
Sodium loses 1 electron
Beryllium loses 2 electrons
Aluminum loses 3 electrons
Oxygen gains 2 electrons