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 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"
15
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