There was an error while loading. Please reload this page.
2 parents 656a8f6 + af096c8 commit 20cce8fCopy full SHA for 20cce8f
README.md
@@ -637,6 +637,29 @@
637
}
638
```
639
640
+ - If you're using multi-line blocks with `if` and `else`, put `else` on the same line as your
641
+ `if` block's closing brace.
642
+
643
+ ```javascript
644
+ // bad
645
+ if (test) {
646
+ thing1();
647
+ thing2();
648
+ }
649
+ else {
650
+ thing3();
651
652
653
+ // good
654
655
656
657
+ } else {
658
659
660
+ ```
661
662
663
**[⬆ back to top](#table-of-contents)**
664
665
0 commit comments