Skip to content

Commit

Permalink
control-statement--value-selection 2
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbox authored Feb 8, 2018
1 parent 16190d8 commit c8b1164
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,20 @@ Other Style Guides
}
```
<a name="control-statement--value-selection"></a>
- [17.2](#control-statements--value-selection) Don't use selection operators in place of control statements.


```javascript
// bad
!isRunning && startRunning();
// good
if (!isRunning) {
startRunning();
}
```

**[⬆ back to top](#table-of-contents)**

## Comments
Expand Down

0 comments on commit c8b1164

Please sign in to comment.