News for hackers. Stuff that matters.
Re:Best Practices Exist For A Reason by Isofarro on Thursday May 03, 2012 @04:08AM (#3922866)
JS Lint is your friend in this case. It will log that

* There's a missing semicolon on line 2

* There's a missing semicolon on line 3

* baz was being used before it was defined.

That's just in a global context. When it's in a function you get a little more:

* the baz line is indented too far - because it's being interpreted as a new statement.

Sure, you could eyeball your code looking for this. Or just use an automated tool that'd do it for you

There are no comments on this comment yet.