Events are things that happen to elements in the webpage
Can be something done by the browser or user
JS can react to events and implement code
We’ve been doing this already with:
map.on('load', function(){
stuff;
});
We can look at all of the event types here: https://docs.mapbox.com/mapbox-gl-js/api/#events
And the specific events under map in the API here: https://docs.mapbox.com/mapbox-gl-js/api/#map