News for hackers. Stuff that matters.
Re:Why You Should Always Use === and Other Bad Practices by 727374 on Sunday February 09, 2014 @07:48PM (#7208359)
Also, putting 'var' in a loop header is debatable because it gives the false impression that the variable "i"'s scope is confined to the for loop, when in reality it will be alive throughout the containing function. JSLint would bark.
Re:Why You Should Always Use === and Other Bad Practices by xiaoma on Sunday February 09, 2014 @09:56PM (#7208834)
I don't think it gives that impression at all.

In JavaScript the rules for scope are clear—it's lexical scoping nested at the function level. Loops, conditionals, etc... have no bearing on scope.