diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md index 9d0a1d503c5..e623722d560 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.md @@ -45,16 +45,16 @@ Access the `myStorage` object and assign the contents of the `glove box` propert assert(gloveBoxContents === 'maps'); ``` -Your code should use dot and bracket notation to access `myStorage`. +Your code should use dot notation, where possible, to access `myStorage`. ```js -assert(/=\s*myStorage\.car\.inside\[\s*("|')glove box\1\s*\]/g.test(code)); +assert.match(code, /myStorage\.car\.inside/); ``` `gloveBoxContents` should still be declared with `const`. ```js -assert.match(code, /const\s+gloveBoxContents\s*=/) +assert.match(code, /const\s+gloveBoxContents\s*=\s*myStorage\.car\.inside\[\s*("|')glove box\1\s*\]|const\s*{\s*('|")glove box\2:\s*gloveBoxContents\s*}\s*=\s*myStorage\.car\.inside;/); ``` # --seed--