Electron affinity is, essentially the opposite of the ionization energy: Instead of removing an electron from the element we add an electron to the element to create an anion.
M + e- ----> M- E.A.
Generally, the energy that results from this process (the electron affinity) is negative or close to zero. The more negative this energy the more this process is favored. The noble gases, alkali metals and alkali earth metals have E.A. close to zero - indicating that these groups of elements do not particularly like to become anions. However, the nonmetals and especially the halogens are highly negative and thus readily become anions. A periodic trend is evident, as was the case for the ionization energy.
Source: www.iun.edu/