Atoms that share pairs of electrons form molecules ... force of attraction between the oppositely charged ions - a positively charged metal ion and a negatively charged non-metal ion.
A small piece of sodium metal is placed in a flask of chlorine gas ... The positive and negative ions attract each other and form the ionic compound sodium chloride. One calcium and two chlorine atoms ...