Sodium chloride (NaCl) is an example of an ionic compound. In an ionic bond, electrons are transferred from one atom to another, resulting in the formation of ions with opposite charges. In the case of sodium chloride, sodium (Na) loses one electron to achieve a stable, positive charge, while chlorine (Cl) gains that electron to achieve a stable, negative charge. The resulting sodium ion (Na+) and chloride ion (Cl-) are attracted to each other due to their opposite charges, forming an ionic bond.