Reputation: 1
I just wrote a piece of code in Javascript where I added an event Listener and then I wrote the event Handler like this:
function checkBoxes() {
const answer=event.currentTarget;
...
...
}
I always thought that it was mandatory to write a parameter in order to use the Event object in a handler, but this code still works, and I would like to know why.
Upvotes: 0
Views: 29