Lesson 200 please anybody: Nested Objects

Lesson 200 please anybody: Nested Objects
0

#1

Tell us what’s happening:
please can anyone help me with the 200 lesson. I’m stuck bad. How can i access maps and make it equal to gloveBoxContents?

var myStorage = {
  "car": {
    "inside": {
      "glove box": "maps",
      "passenger seat": "crumbs"
     },
    "outside": {
      "trunk": "jack"
    }
  }
};

var gloveBoxContents = "";

#2

Here myStorage is an object with just one property called car and it holds another object. To get to this object, you can use myStorage.car or myStorage['car'] (the first one is preferable).

Now this object has two objects called inside and outside. You can get to either of them the same way you do with myStorage.car.