Install & run jshint on the command line
For ubuntu/linux, assuming you have nodejs installed
Then run jshint on your javascript file
sudo npm install -g jshint
Then run jshint on your javascript file
jshint yourjsfile.js