mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-07 00:03:44 -05:00
fix: destructuring issue fixed (#51345)
This commit is contained in:
@@ -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--
|
||||
|
||||
Reference in New Issue
Block a user