Yay, we've finally gotten into the DOM and manipulated it! Congrats on where you're at so far!
With JavaScript, we can now dynamically change what is on the page as opposed to only using alerts and console messages. Here's an overview of what we learned:
- querySelector and querySelectorAll are our gateways into the magical realm of the DOM.
- The DOM exists only in memory as a dynamic representation of where the HTML was when the page was loaded.
- Selectors for these methods will use CSS selectors; legacy methods will not.
- Properties of nodes can be changed, but the nomenclature varies.
In the next chapter, we'll work more with events. Events are at the heart of a JavaScript program, so let's learn about their structure and use.