-
What is an Object, and how is it different from an Array in Javascript?
-
In the space below, create an Object stored to a variable named
petStore
. This Object should hold an inventory of items and the number of that item that you might find at a pet store. -
Given the following
states = {"CO": "Colorado", "IA": "Iowa", "OK": "Oklahoma"}
, how would you access the value"Iowa"
? -
How would you add a new property to that Object with a key of
"MN"
and a value of"Minnesota"
? -
What is another example of when we might use a Object? In this case, why is an Object better than an Array?
-
What questions do you still have about Objects?