innerText property returns the visible text
inside the element whereas
textContent returns the
complete text, whether hideen from view or not.
Look at the console result, and
you’ll see that the
only returned “Battle” because the other
text had the css property
display set to
textContent property returned
the complete text, “Battle of the sharpest minds”
regardless whether the text was visible or not.