Accessing Nested Objects need to solve

Accessing Nested Objects need to solve
0.0 0

#1

Tell us what’s happening:

what is wrong ???

Your code so far

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

// Only change code below this line

var gloveBoxContents = "maps"; // Change this line
myStorage.car.inside["glove box"] = gloveBoxContents;

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36.

Link to the challenge:


#2

You should only have a single line of code. It should start with:

var gloveBoxContents = ???;

Replace the ??? with a reference to the value “maps” using a combination of dot and bracket notation to access the nested properties.

You actually have the correct reference part in your code, but have it in the wrong place. You should be assigning the reference to gloveBoxContents and not the other way around.


#3

Thanks a lot i was sticking for 3 h for that simple error :ok_hand: