File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change 369369 - Use one ` var ` declaration per variable.
370370 It's easier to add new variable declarations this way, and you never have
371371 to worry about swapping out a ` ;` for a ` ,` or introducing punctuation-only
372- diffs.
372+ diffs.
373373
374374 ` ` ` javascript
375375 // bad
854854 .call(tron.led);
855855 ` ` `
856856
857+ - Leave a blank line after blocks and before the next statement
858+
859+ ` ` ` javascript
860+ // bad
861+ if (foo) {
862+ return bar;
863+ }
864+ return baz;
865+
866+ // good
867+ if (foo) {
868+ return bar;
869+ }
870+
871+ return baz
872+
873+ // bad
874+ var obj = {
875+ foo: function() {
876+ },
877+ bar: function() {
878+ }
879+ };
880+ return obj;
881+
882+ // good
883+ var obj = {
884+ foo: function() {
885+ },
886+
887+ bar: function() {
888+ }
889+ };
890+
891+ return obj;
892+ ` ` `
893+
894+
857895** [⬆ back to top](#table- of - contents)**
858896
859897## Commas
You can’t perform that action at this time.
0 commit comments