Skip to content

Commit feaca88

Browse files
committed
Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages
2 parents 938c0cb + 2116dce commit feaca88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/destructuring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ s === Boolean.prototype.toString // true
420420

421421
上面代码中,数值和布尔值的包装对象都有`toString`属性,因此变量`s`都能取到值。
422422

423-
解构赋值的规则是,只要等号右边的值不是对象,就先将其转为对象。由于`undefined``null`无法转为对象,所以对它们进行解构赋值,都会报错。
423+
解构赋值的规则是,只要等号右边的值不是对象或数组,就先将其转为对象。由于`undefined``null`无法转为对象,所以对它们进行解构赋值,都会报错。
424424

425425
```javascript
426426
let { prop: x } = undefined; // TypeError

0 commit comments

Comments
 (0)