|
|
|
|
|
by z3t4
4009 days ago
|
|
I love these kind of style guides. But I also love to prove them wrong. Unless you "use strict", it's better to put var in-front of every variable if you put them on separate lines. var foo = 1,
bar = 2
baz = 3
vs var foo = 1;
var bar = 2;
var baz = 3;
Forgetting a comma or semicolon in the first example might lead to silent bugs that will take hours to find. |
|
https://github.com/airbnb/javascript#13.2