Skip to content

Commit

Permalink
纠正 5.1, 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
houlinjiang committed Aug 8, 2020
1 parent 3903cea commit b6170d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ Other Style Guides
<a name="destructuring--object"></a>
- [5.1](#destructuring--object) 用对象的解构赋值来获取和使用对象某个或多个属性值。 eslint: [`prefer-destructuring`](https://eslint.org/docs/rules/prefer-destructuring)

> Why? 解构保存了这些属性的临时值/引用
> Why? 解构使您不必为这些属性创建临时引用
```javascript
// bad
Expand Down Expand Up @@ -560,7 +560,7 @@ Other Style Guides

<a name="5.3"></a>
<a name="destructuring--object-over-array"></a>
- [5.3](#destructuring--object-over-array) 多个返回值用对象的解构,而不是数据解构
- [5.3](#destructuring--object-over-array) 多个返回值用对象的解构,而不是数组解构

> Why? 你可以在后期添加新的属性或者变换变量的顺序而不会打破原有的调用
Expand Down Expand Up @@ -1337,7 +1337,7 @@ Other Style Guides
}
}

// good - this 被使用了
// good - this 被使用了
class Foo {
bar() {
console.log(this.bar);
Expand Down

0 comments on commit b6170d6

Please sign in to comment.