Skip to content

Commit 86c754c

Browse files
committed
give scope to variables 'a' and 'b' while destructuring
1 parent f90af9d commit 86c754c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

destructuring/README.md

+1-1
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)