A chemist performed a reaction in which two chlorine atoms form a compound with a magnesium atom through an ionic bond. Which statement is true about the compound the chemist made?