mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
Update destructuring.md
This commit is contained in:
parent
aaf0750fd4
commit
16ecbb938d
@ -170,7 +170,7 @@ let [x = y, y = 1] = []; // ReferenceError: y is not defined
|
||||
|
||||
### 简介
|
||||
|
||||
解构不仅可以用于数组,还可以用于对象。需要注意的是,对象的解构赋值只是一种浅拷贝。
|
||||
解构不仅可以用于数组,还可以用于对象。
|
||||
|
||||
```javascript
|
||||
let { foo, bar } = { foo: 'aaa', bar: 'bbb' };
|
||||
|
Loading…
x
Reference in New Issue
Block a user