What causes an ionic bond to form between sodium and chlorine?

Sodium and chlorine atoms share electrons.

Sodium and chlorine atoms switch electrons.

Sodium atoms gain electrons.

Sodium atoms donate electrons.