Only when an event occurs in the context of the object on which they are registered are event listeners called. The button node is given a handler in this example. Clicking the button activates the handler, but clicking anywhere else in the document does not. Adding a onclick attribute to a node has a similar effect.
Using addEventListener, add an event handler to each of the div tags ().
Double-check that the event is "click" here.
The method addEventListener() takes three parameters.