mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 00:28:25 -05:00
Improves 'Why?' message
This commit is contained in:
@@ -2000,7 +2000,7 @@ Other Style Guides
|
||||
<a name="control-statements"></a>
|
||||
- [17.1](#control-statements) In case your control statement (`if`, `while` etc.) gets too long or exceeds the maximum line length, each (grouped) condition could be put into a new line. The logical operator should begin the line.
|
||||
|
||||
> Why? This ensures readability.
|
||||
> Why? Having operators at the beginning of the line keeps the operators aligned and follows a pattern similar to method chaining. This also improves readability by making it easier to visually follow complex logic.
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
|
||||
Reference in New Issue
Block a user