From 4b5348a5fc597e2f6084aaec76f346e48d957fd2 Mon Sep 17 00:00:00 2001 From: Christopher Banh Date: Fri, 16 Oct 2015 10:35:14 -0700 Subject: [PATCH] Add examples with if statements to 18.8 --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c1993595..028f7295 100644 --- a/README.md +++ b/README.md @@ -1530,13 +1530,10 @@ Other Style Guides } // also bad - function bar() { + if (baz) { - console.log(foo); - } - - // still bad - function bar() { + console.log(qux); + } else { console.log(foo); } @@ -1545,6 +1542,13 @@ Other Style Guides function bar() { console.log(foo); } + + // good + if (baz) { + console.log(qux); + } else { + console.log(foo); + } ```