1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-25 03:02:21 +00:00

Update destructuring.md

This commit is contained in:
bigbird231 2019-04-18 18:24:22 +08:00 committed by GitHub
parent c3a4a17afa
commit bd2840d8ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,7 @@ let [x = y, y = 1] = []; // ReferenceError: y is not defined
### 简介 ### 简介
解构不仅可以用于数组,还可以用于对象。 解构不仅可以用于数组,还可以用于对象。需要注意的是,对象的解构赋值只是一种浅拷贝。
```javascript ```javascript
let { foo, bar } = { foo: 'aaa', bar: 'bbb' }; let { foo, bar } = { foo: 'aaa', bar: 'bbb' };