fix: destructuring issue fixed (#51345)

This commit is contained in:
Riya Dhawan
2023-09-06 11:46:48 +05:30
committed by GitHub
parent 2e7d900538
commit 6ab183f837

View File

@@ -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--