diff --git a/README.md b/README.md index f1dadba1..06a4eb6b 100644 --- a/README.md +++ b/README.md @@ -1033,7 +1033,7 @@ Other Style Guides - [11.1](#11.1) Don't use iterators. Prefer JavaScript's higher-order functions like `map()` and `reduce()` instead of loops like `for-of`. eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator.html) - > Why? This enforces our immutable rule. Dealing with pure functions that return values is easier to reason about than side-effects. + > Why? This enforces our immutable rule. Dealing with pure functions that return values is easier to reason about than side effects. ```javascript const numbers = [1, 2, 3, 4, 5]; @@ -2217,7 +2217,7 @@ Other Style Guides ## Accessors - [23.1](#23.1) Accessor functions for properties are not required. - - [23.2](#23.2) If you do make accessor functions use getVal() and setVal('hello'). + - [23.2](#23.2) Do not use JavaScript getters/setters as they cause unexpected side effects and are harder to test, maintain, and reason about. Instead, if you do make accessor functions, use getVal() and setVal('hello'). ```javascript // bad