When a component made up of atoms that easily shed electrons (a metal) reacts with a component composed of atoms that readily attain electrons (a nonmetal), a transfer of electrons commonly happens, creating ions. The compound formed by this transfer is stabilized by the electrostatic attractions (ionic bonds) between the https://cyanolab.net/potassium-cyanide/