01 / 03
Writing "when this gets pressed"
To make something happen when a button is pressed, you register a function to be called on press. That is what addEventListener does.
The first argument, "click", is the "when pressed" part. The second is what to do about it.
const button = document.getElementById("add")button.addEventListener("click", () => { console.log("pressed")})