Add examples with if statements to 18.8

This commit is contained in:
Christopher Banh
2015-10-16 10:35:14 -07:00
parent d276b0c389
commit 4b5348a5fc

View File

@@ -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);
}
```