Re:Poll: Semicolons in JavaScript
by mumrah on Monday July 26, 2010 @10:37AM
(#1548117)
Absolutely. Also, always use "var" in your variable declarations. I can't count how many times a scope issue bit me in the ass b/c of a missing "var"
[ Parent
| on HN ]
Putting a single "use strict"; line at the top of a source file or function will turn on ECMAScript 5 strict mode for that scope, which will error on assigning a previously undeclared variable. I'm not sure if any browsers currently implement this though.