mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
修改destructuring
This commit is contained in:
parent
8f9b3bd02e
commit
9d3cc774bc
@ -84,8 +84,8 @@ var [foo] = null;
|
||||
var [foo = true] = [];
|
||||
foo // true
|
||||
|
||||
[x, y='b'] = ['a'] // x=3, y='b'
|
||||
[x, y='b'] = ['a', undefined] // x=3, y='b'
|
||||
[x, y='b'] = ['a'] // x='a', y='b'
|
||||
[x, y='b'] = ['a', undefined] // x='a', y='b'
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user