Dom-events Flashcards
Why do we log things to the console?
to double check our work
What is the purpose of events and event handling?
run a function/action when theres an interaction with an object
Are all possible parameters required to use a JavaScript method or function?
no
What method of element objects lets you set up a function to be called when a specific type of event occurs?
What is a callback function?
What object is passed into an event listener callback when the event fires?
What is the event.target? If you weren’t sure, how would you check? Where could you get more information about it?
the target of the element that causes the line of code to run
What is the difference between these two snippets of code?
the first is just a normal execute function. the 2nd one has a parameter passed through and recalled.