var ourStorage = {
"desk": {
"drawer": "stapler"
},
"cabinet": {
"top drawer": {
"folder1": "a file",
"folder2": "secrets"
},
"bottom drawer": "soda"
}
};
ourStorage.cabinet["top drawer"].folder2; // "secrets"
ourStorage.desk.drawer; // "stapler"
myStorage
object and assign the contents of the glove box
property to the gloveBoxContents
variable. Use bracket notation for properties with a space in their name.
gloveBoxContents
should equal "maps"
testString: 'assert(gloveBoxContents === "maps", ''gloveBoxContents
should equal "maps"'');'
- text: Use dot and bracket notation to access myStorage
testString: 'assert(/=\s*myStorage\.car\.inside\[\s*("|'')glove box\1\s*\]/g.test(code), ''Use dot and bracket notation to access myStorage
'');'
```