What are DOM events and how do you handle them?
DOM events notify you when something is happening in the browser, for example a mouse click. There is a long list of events that you as a developer can listen for. A function is then called to handle the event once it occurs.
console.log('The DOM has been loaded') //returns The DOM has been loaded
document.addEventListener('DOMContentLoaded', loadedFunction, false);
Listening for the DOMContentLoaded ...