Writing formulas for ionic cmpds
Compounds are neutral overall. Therefore
NaCl is array of Na+ and Cl- ions
Na2S is array of Na+ and S2- ions