I just spent some time debugging the problem, which came down to forgetting to use the var keyword before the new variable identifier, so Javascript automatically created this variable in the global scope. Is there a way to prevent this or change the default behavior without using a validator like JSLint?
Running a validator between writing and executing Javascript seems like a bad pretext to compile, which is the step I usually relied on to catch something like that.
I assume the answer is no, so I look through the JSLint Eclipse plugin when I publish this.
source share