From 95c490a03e9e1f50f5b85ef2aa2c5f8dc3032ce1 Mon Sep 17 00:00:00 2001 From: Gil Birman Date: Thu, 8 Feb 2018 12:58:09 -0800 Subject: [PATCH] control-statement--value-selection --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index ee02c0e97c..21ef95936d 100644 --- a/README.md +++ b/README.md @@ -2175,6 +2175,20 @@ Other Style Guides } ``` + + - [17.2](#control-statements--value-selection) Don't value selection operators in place of control statements. + + + ```javascript + // bad + !isRunning && startRunning(); + + // good + if (!isRunning) { + startRunning(); + } + ``` + **[⬆ back to top](#table-of-contents)** ## Comments