News for hackers. Stuff that matters.
Re:Twitter crashes itself with commas by OriginalSyn on Wednesday July 18, 2012 @12:49PM (#4261597)
But this is a simple error caught by js(h/l)int. And it's especially easy to spot if you just declare each var one after another:

    var a,
        b,
        c,
        d;
        e;
         
Then your editor (which you've a integrated a linter... right?) will protested:

    yourJsFile.js |5 warning| 'e' was used before it was defined.
And if you have a global by the same name you'll see:

    yourJsFile.js |5 warning| Expected an assignment or function call and instead saw an expression.
Granted, if you assign it a default value then, yes you're going to have a bad time. But if you follow the white spacing rules of jsLint it will catch the obvious error.

There are no comments on this comment yet.