Fixed destructing example value

```var scores = [22, 33]
var [math = 50, sci = 50, arts = 50] = scores
```
In the end, sci is equal to 33 (and not 23) :)
This commit is contained in:
Rob 2017-10-28 14:08:00 -04:00 committed by GitHub
parent 15b41590f3
commit d458de7f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
es6.md
View File

@ -212,7 +212,7 @@ var [math = 50, sci = 50, arts = 50] = scores
```js
// Result:
// math === 22, sci === 23, arts === 50
// math === 22, sci === 33, arts === 50
```
Default values can be assigned while destructuring arrays or objects.