dom-manipulation Flashcards
What is the className property of element objects?
the class names on the element that we chose
ow do you update the CSS class attribute of an element using JavaScript?
using className property
What is the textContent property of element objects?
it retrieves and replaces the text content of the html element
How do you update the text within an element using JavaScript?
textContent property
Is the event parameter of an event listener callback always useful?
generally useful 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?
it would be harder
Why is storing information about a program in variables better than only storing it in the DOM?
DOM does not need to repull - we cannot depend on the DOM