JavaScript JavaScript and the DOM Responding to User Interaction Listening for Events with addEventListener()

console is throwing error:

The console is throwing the error: Uncaught TypeError: listItems.addEventListener is not a function at app.js:12 my workspace is https://w.trhou.se/7ijapmkqmj

1 Answer

Simon Coates
Simon Coates
4,075 Points

you have

  listItems.addEventListener('mouseout', () => {

in one location that you should have

  listItems[i].addEventListener('mouseout', () => {

Okay, thanks