The correct options are
B Ionic compound
D Electrovalent compound
In MgCl2, Magnesium has 12 electrons, and its electronic configuration can be written as 2,8,2. Thus Magnesium has two electrons in its outermost orbit or it can be said that Magnesium has 2 valence electrons.
In MgCl2, each Chlorine atom has 17 electrons and its electronic configuration can be written as 2,8,7. Thus each Chlorine atom has seven electrons in its outermost orbit or it can be said that each Chlorine has 7 valence electrons.
Magnesium wants to give away its two valence electrons to complete its octet by having 8 electrons in its outermost orbit attaining the electronic configuration of its nearest inert gas Neon. And each chlorine atom wants to complete its octet by adding one more electron in its outermost orbit so that it can have 8 electrons in its outermost orbit attaining the electronic configuration of its nearest inert gas Argon.
So, we see that Magnesium wants to lose two electrons and each Chlorine atom wants to add one more electron in their outermost orbit
Thus, Magnesium transfers its two electrons to two Chlorine atoms (one electron to each Chlorine atom) and thus Magnesium obtains +2 charge and each chlorine atom acquires −1 charge and ionic bonds are formed between the atoms of the molecule.
An eletrovalent compound or ionic compound is formed when one atom in the compound transfers its electrons from itself to its neighboring atom.
In MgCl2, Magnesium transfers its two electrons to its neighboring chlorine atoms, and forms two ionic bonds between the atoms.
Thus, MgCl2 is an electrovalent compound or an ionic compound.