Dom-Manipulation Flashcards
What is the className property of element objects?
The className propert of the element object allows you to update the value of the class attribute of the queryed element
How do you update the CSS class attribute of an element using JavaScript?
use the className property of a element node
What is the textContent property of element objects?
the textContent property represents the text content within the specified element node and allows you to also update the text content.
How do you update the text within an element using JavaScript?
use the textContent property
Is the event parameter of an event listener callback always useful?
No.
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.
Why is storing information about a program in variables better than only storing it in the DOM?
It can be accessed for later use.