Well, they are talking about the same thing but here are the definitions.
is a chemical property that says how well an atom can attract electrons towards itself. The electronegativity of an atom is influenced by the atom’s and the distance between the atom’s It was first theorised by Linus Pauling in 1932.
The electron affinity of an atom or molecule is defined as the amount of energy released when an electron is added to a neutral atom or molecule in the gaseous state to form a negative ion.
X + eā ā ##X^(ā)## + energy