Categories
Web Development

02 Week – Reviewing intermediate level Javascript

This weeks focus was to refresh our memory on how to use objects, arrays, and selectors. Here are the exercises we practiced.

Blog questions

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 querySelector() and 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.

Leave a Reply

Your email address will not be published. Required fields are marked *