Sodium chloride has Na+ and Cl− ions. These oppositely charged ions are held by electrostatic forces of attraction or ionic bonds.
In NH+4 ion, N (with 5 electrons in outer shell) forms 3 covalent and 1 coordinate bond with 4 H atoms.
In carbon tetrachloride, (CCl4), C atom shares one electron each with 4 Cl atoms and forms 4 covalent bonds.