Answer:
Chlorine has higher electronegativity
Explanations:
What is electronegativity of an element?
This is the tendency of an element to attract electron to itself. According to the periodic table, the electronegativity of an element increases from the left to the right across the period and decreases top to bottom down the group.
This trend exists due to the electronic configuration of the elements. Chlorine element has 7 valence electron in its outer shell and as such will easily accept an electron to itself to attain its octet configuration compared to magnesium that looses his two valence electrons to other elements in order to attain octet configuration.
The tendency of chlorine atom to attract electron makes it have a higher electronegativity compared to magnesium.