Hi I am beginner in JS, Using linux ( Firefox, Chrome), Is there any way by which I get what are the syntax errors are there in my JS, the way I get my C syntax error in GCC?
Asked
Active
Viewed 152 times
3
-
This looks like a duplicate of http://stackoverflow.com/questions/2120093/how-to-find-javascript-syntax-errors/5206523#5206523 – Gabriel Mar 05 '11 at 20:17
3 Answers
3
Install Firebug, it will save your life!!! Anyway in Firefox you can look into the error console in the tools menu and in Chrome you can open the javascript console in the tools menu.

mck89
- 18,918
- 16
- 89
- 106
0
Chrome : ctrl + shift + j : this will bring up the JavaScript console. You can click the scripts tab to review page scripts.
FireFox : Install firebug and run it to get a similar console to the above stated chrome utilities.
IDE : You may wish to use netbeans or Eclipse which both offer syntax highlighting and code completion for JavaScript. These will indicate syntax errors at code time.
jslint/jshint : These tools offer code suggestions to improve your code quality and reduce the possibility of errors (logic) but will also break on syntax and other errors.

Gabriel
- 18,322
- 2
- 37
- 44