Electron affinity is the energy released when an electron is accepted by a neutral atom forming a negative ion. Chlorine has the higher electron affinity because it readily accepts an electron to become more stable. On the other hand, sodium have to give up an electron to complete its valence shell.