You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -590,7 +590,7 @@ Other Style Guides
590
590
<a name="es6-rest"></a>
591
591
- [7.6](#7.6) <a name='7.6'></a> Never use `arguments`, opt to use rest syntax `...` instead. [`prefer-rest-params`](http://eslint.org/docs/rules/prefer-rest-params)
592
592
593
-
> Why? `...` is explicit about which arguments you want pulled. Plus rest arguments are a real Array and not Array-like like `arguments`.
593
+
> Why? `...` is explicit about which arguments you want pulled. Plus, rest arguments are a real Array, and not merely Array-like like `arguments`.
594
594
595
595
```javascript
596
596
// bad
@@ -1112,7 +1112,7 @@ Other Style Guides
1112
1112
1113
1113
- [13.2](#13.2) <a name='13.2'></a> Use one `const` declaration per variable. eslint: [`one-var`](http://eslint.org/docs/rules/one-var.html) jscs: [`disallowMultipleVarDecl`](http://jscs.info/rule/disallowMultipleVarDecl)
1114
1114
1115
-
> Why? It's easier to add newvariable declarations this way, and you never have to worry about swapping out a `;`for a `,` or introducing punctuation-only diffs.
1115
+
> Why? It's easier to add newvariable declarations this way, and you never have to worry about swapping out a `;`for a `,` or introducing punctuation-only diffs.You can also step through each declaration with the debugger, instead of jumping through all of them at once.
1116
1116
1117
1117
```javascript
1118
1118
// bad
@@ -1339,6 +1339,7 @@ Other Style Guides
1339
1339
```
1340
1340
1341
1341
- [15.4](#15.4) <a name='15.4'></a> For more information see [Truth Equality and JavaScript](http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/#more-2108) by Angus Croll.
1342
+
1342
1343
- [15.5](#15.5) <a name='15.5'></a> Use braces to create blocks in `case` and `default` clauses that contain lexical declarations (e.g. `let`, `const`, `function`, and `class`).
1343
1344
1344
1345
> Why? Lexical declarations are visible in the entire `switch` block but only get initialized when assigned, which only happens when its `case` is reached. This causes problems when multiple `case` clauses attempt to define the same thing.
0 commit comments