We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c108637 + d6cf463 commit 2116dceCopy full SHA for 2116dce
docs/destructuring.md
@@ -420,7 +420,7 @@ s === Boolean.prototype.toString // true
420
421
上面代码中,数值和布尔值的包装对象都有`toString`属性,因此变量`s`都能取到值。
422
423
-解构赋值的规则是,只要等号右边的值不是对象,就先将其转为对象。由于`undefined`和`null`无法转为对象,所以对它们进行解构赋值,都会报错。
+解构赋值的规则是,只要等号右边的值不是对象或数组,就先将其转为对象。由于`undefined`和`null`无法转为对象,所以对它们进行解构赋值,都会报错。
424
425
```javascript
426
let { prop: x } = undefined; // TypeError
0 commit comments