A covalent bond is formed when two atoms each share one electron, an example of a molecule that has covalent bonding is methane or CH4. An ionic bond is where one (or more) atom donates an electron(s) to another atom to form positive and negative ions. The ions are attracted to each other through electrostatic forces of attraction due to their opposite charges. An example of a molecule with ionic bonding is sodium chloride (NaCl) otherwise known as salt. Another way of thinking about covalent and ionic bonding is that covalent bonding is like velcro where the hooks and loops both contribute to the bond to create a visible bond, whereas an ionic bond is more like oppositely charged magnets.