What would be the correct formula of a ionic compound formed if a certain metal M with valence electron configuration Ns2 reacted with a nonmetal valence electron Ns2Np4?

M becomes ${M}^{\text{+2}}$ and X becomes ${X}^{\text{+2}}$