【JS】Intermediate2:Events and Callbacks
event-driven :waiting for and reacting to events
2.page loads, user interacts (clicks, hovers, changes) ,triggered manually
3.A group of the things needed to listen for an event; the callback function, an element and the call to listen for an event:
addEventListener
is a method found on all DOM elements
Called on element saved in the button variable
The name of the event to listen for='click'
Callback function