Why do we log things to the console?
What is a “model”?
Which “document” is being referred to in the phrase Document Object Model?
Which “objects” are being referred to in the phrase Document Object Model?
What is a DOM Tree?
Give two examples of document methods that retrieve a single element from the DOM.
Give one example of a document method that retrieves multiple elements from the DOM at once.
Why might you want to assign the return value of a DOM query to a variable?
What console method allows you to inspect the properties of a DOM query to a variable?
Why would a
tag need to be placed at the bottom of the HTML content, instead of at the top?
What does document.querySelector() take as its argument and what does it return?
What does document.querySelectorAll() take as its argument and what does it return?
What is the purpose of events and event handling?
Are all possible parameters required to use a JavaScript method or function?
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 info about it?
What is the difference between these two snippets of code?
element.addEventListener(‘click’, handleClick):
- This is passing a variable in as the function.
element.addEventListener(‘click’, handleClick()):
- This is calling the function inside the event listener method.
(DO NOT DO THIS)