4 ms·
that's why many people favor this variant: var a = "foo" , b = "bar" , c = "baz" ;
by fuzzythinker 15y ago
that's why many people favor this variant:
var
a = "foo"
, b = "bar"
, c = "baz"
;
- webXL 15y agoI see this hideous convention used a lot when assigning nodejs modules, so you can easily comment out modules for debugging purposes (I think). Other than that, why is "[NL], b = 1" safer or better than "b = 1,[NL]"?
- mnutt 15y agoThat makes the commas easier to see (and is ugly IMO) but it's still one comma away from making the rest of your variables global. What's so bad about just var a = "foo"; var b = "bar"; var c = "baz";