DOM-manipulation Flashcards
What is the className property of element objects?
Access or change classname
How do you update the CSS class attribute of an element using JavaScript
className property
What is the textContent property of elements objects?
Text content of the nodes and its descendants
How do you update the text within an element using JavaScript?
You can use the textContent or innerHTML property
Is the event parameter of an event listener callback always useful?
No, not always
Would this assignment be simpler or more complicated if we didn’t use a variable to keep track of the number of clicks?
More complicated because we wouldn’t be able to differentiate between
Why is storing information about a program in variables better than only storing it in the DOM?
JavaScript is the source of truth.