We know that as we move from left to right across a period in a modern periodic table, electronegativity increases ( i.e., gaining of electrons from an atom ). So Magnesium(Mg) who has an atomic no. as 12 will not gain electrons but share/transfer electrons to Neon(Ne).
I hope this answer will help you...If it does then mark my answer as the brainliest!!!
Byee!!!