Answer:
Oxygen accepts these two electrons and becomes a negatively charged ion, i.e. an anion, O2− . The cation and the anion will then be attracted to each other by way of the electrostatic force of attraction → an ionic bond is formed.
Explanation:
Magnesium has 2 valence electrons, and oxygen has 6 valence electrons. Which type of bonding is likely to occur between a magnesium atom and an oxygen atom?