How to properly call a function in an event handler
Hello guys, sorry to disturb you all; I'm getting an error on line 7 but I didn't understand why, can someone explain why please
4 Replies
the argument that is passed onto the call back function in the addEventListener() is an event object and not a function
console log loadScript
and u will understand your mistake
ahhhh I see
the loadScript is an event object
u might be more familiar doing
your
localScript
within the event listener in your code is the e
here
the convention is to call it e
or event
cause it is an event objectyep I see, I totally messed up with the argument being passed