Hacker News new | ask | show | jobs
by bceagle 4125 days ago
Sure, this is annoying, but the reality is that this type of stuff is very easily avoided through the use of linters. IMO, you should never work on a dynamic scripted language like JavaScript without constantly running a linter in the background to pick up stuff like this.
1 comments

Exactly my thoughts. Just ran the snippet through JSHINT and while it doesn't recognize the exact error it shows you the location where it happens.

http://jsfiddle.net/hnxjxyte/

Plus, with a text editor plugin like https://packagecontrol.io/packages/SublimeLinter-jshint it becomes a no-brainer.