The events allow us to listen for something inside our D.O.M.
Here is the list of all avaible events (MDN)
that we can listen to.
In the gif down below we see the snippet of code in action.
When the button is clicked the addEventListener perform the action, in this case we add or remove the class red to our button (element).
There is also the event object but we talk about it later and more in depth.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)