–As metals have 3 or less electrons in their valence
shell, it’s easier to lose 1 or 2 or 3 electrons than gain 7 or 6
or 5 electrons.
–Similarly, since most non-metals have 5 or more electrons
in their valence shell, when they react with metals, it’s
easier for them to gain 3 or 2 or 1 electrons than lose 5 or 6 or
7 electrons!
So, when a metal and a non-metal react the metal transfers
electron(s) to the nonmetal.
When two non-metals are involved however, as in the following examples,
–2H2 (g) + O2 (g) à 2H2O (l)
–C
(g) + O2 (g) à CO2 (g)
they share electrons between them because neither of the
non-metals have a tendency to lose electron(s).