Dot-and-cross diagrams can show electrons being transferred and ions being formed. Dots represent electrons from 1 atom and crosses represent electrons from the other atom. Square brackets and a charge (e.g. 2+) represent ions.
Sodium + Fluorine
The sodium atom transfers its outer electron to the fluorine atom, creating Na+ and F- ions. Both of these ions have full outer shells.
Calcium + Oxygen
The calcium atom transfers its 2 outer electrons to the oxygen atom, creating Ca2+ and O2- ions which both have full outer shells.