News for hackers. Stuff that matters.
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"
Re:Poll: Semicolons in JavaScript by rchowe on Monday July 26, 2010 @06:11PM (#1549496)
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.