Skip to content

Commit 67d88cc

Browse files
committed
Merge pull request #8 from benjaminlees/give-scope
give scope to variables 'a' and 'b' while destructuring
2 parents 551288e + 86c754c commit 67d88cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

destructuring/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let f = () => {
1313
return [1,2];
1414
}
1515
16-
[a.b] = f();
16+
let [a.b] = f();
1717
// variable a now equals 1 and variable equals 2
1818
```
1919

0 commit comments

Comments
 (0)