I\'m learning how to manipulate events in JavaScript and I\'m wondering \"why do you have to pass the event object as a parameter (argument) into a function when using event
You aren't passing an event into the function, you are naming the first parameter passed to your function event
.
The browser is the one that is going to call your function and it passes an event object when it calls your function. You can choose not to name that parameter function(){}
but the browser is still going to pass the event object in, you can use it or not use it as you see fit.