Ionic bonds are formed when?

Ionic bonds are formed when atoms give away their valence electrons. They give them to other atoms to fill their shells. A bond is created from them having opposite charges that attract one another.