File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Expand file tree Collapse file tree 1 file changed +38
-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 (true) {
862+ var a = 2;
863+ }
864+ var b = 3;
865+
866+ // good
867+ if (true) {
868+ var a = 2;
869+ }
870+ var b = 3;
871+
872+ // bad
873+ var o = {
874+ foo: function() {
875+ },
876+ bar: function() {
877+ }
878+ };
879+ return o;
880+
881+ // good
882+ var o = {
883+ foo: function() {
884+ },
885+
886+ bar: function() {
887+ }
888+ };
889+
890+ return o;
891+ ` ` `
892+
893+
857894** [⬆ back to top](#table- of - contents)**
858895
859896## Commas
You can’t perform that action at this time.
0 commit comments