This weeks focus was to refresh our memory on how to use objects, arrays, and selectors. Here are the exercises we practiced.
Why are arrays of objects such commonly used data structures? Give an example of how an array of objects is used on a webpage.
Arrays of objects are commonly used data structures because they allow the user to easily select the object without having to coordinate with the numbers because they are labeled with labels instead.
Describe the difference between
querySelectorAll(). What kinds of values can be passed as an argument to either selector?
If you use querySelector( ) it will only select the first item that matches the inquiry whereas if you use the querySelectorAll() it will select all that match the inquiry.