diff options
author | exprassL <49985254+exprassL@users.noreply.github.com> | 2021-12-21 21:46:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 21:46:11 +0800 |
commit | 2ef4244da710da85d3cf29472957acc504302a4c (patch) | |
tree | 903d51da48297722d06d4556dfff50cfc734fb77 | |
parent | 427dd0d68ecb7e43c394ffe232822e582c053d89 (diff) | |
download | translated-content-2ef4244da710da85d3cf29472957acc504302a4c.tar.gz translated-content-2ef4244da710da85d3cf29472957acc504302a4c.tar.bz2 translated-content-2ef4244da710da85d3cf29472957acc504302a4c.zip |
”无效的 JavaScript 标识符作为属性名称“一节输出值有误 (#3290)
输出值应是 boolean true,不是字符串 "true"
-rw-r--r-- | files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html b/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html index 4c6c4a4457..8d56764ac3 100644 --- a/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html +++ b/files/zh-cn/web/javascript/reference/operators/destructuring_assignment/index.html @@ -370,7 +370,7 @@ rest; // { c: 30, d: 40 }</pre> <pre class="brush: js">const foo = { 'fizz-buzz': true }; const { 'fizz-buzz': fizzBuzz } = foo; -console.log(fizzBuzz); // "true" +console.log(fizzBuzz); // true </pre> <h3 id="解构对象时会查找原型链(如果属性不在对象自身,将从原型链中查找)">解构对象时会查找原型链(如果属性不在对象自身,将从原型链中查找)</h3> |