How to check client-side JavaScript code for syntax errors?

Steven Hammons picture Steven Hammons · Mar 11, 2011 · Viewed 54.4k times · Source

I have some client-side JavaScript code and want to check that file for syntax errors/warnings.

What is the easiest way to check my JavaScript file for "compile time" errors, such as a mismatched bracket or a keyword typo?

Answer

Shaggy Frog picture Shaggy Frog · Mar 11, 2011

Copy and paste it into http://www.jslint.com/ but be prepared to "have your feelings hurt".