1var ourStorage = {
2 "desk": {
3 "drawer": "stapler"
4 },
5 "cabinet": {
6 "top drawer": {
7 "folder1": "a file",
8 "folder2": "secrets"
9 },
10 "bottom drawer": "soda"
11 }
12};
13ourStorage.cabinet["top drawer"].folder2; // "secrets"
14ourStorage.desk.drawer; // "stapler"
1var myPlants = [
2 {
3 type: "flowers",
4 list: [
5 "rose",
6 "tulip",
7 "dandelion"
8 ]
9 },
10 {
11 type: "trees",
12 list: [
13 "fir",
14 "pine",
15 "birch"
16 ]
17 }
18];
19
20var secondTree = myPlants[1].list[1];
21
22console.log(myPlants[1].list[1]);
1// Setup
2var myStorage = {
3 "car": {
4 "inside": {
5 "glove box": "maps",
6 "passenger seat": "crumbs"
7 },
8 "outside": {
9 "trunk": "jack"
10 }
11 }
12};
13
14var gloveBoxContents = myStorage.car.inside["glove box"]; // "maps"
15
16console.log(gloveBoxContents); // to test your code