Every Node object in our DOM can trigger an event. The object that triggers our particular event is called the target:
In the above example, the
is the target for both
mouseout events. We listen to these
events on the
p element and change
the color of the text depending on
which event was triggered.
event parameter that we see in
addEventListener is an
It is automatically passed to all event
handlers. It helps in passing extra information like
target to the event handler.