SunnyShah
SunnyShah

Reputation: 30467

How to get readable syntax errors in Java Script?

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?

Upvotes: 3

Views: 161

Answers (3)

Gabriel
Gabriel

Reputation: 18780

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.

Upvotes: 0

oezi
oezi

Reputation: 51797

if you use a script-editor like netbeans, it will show syntak errors on typing. for testing in a browser, i would suggest using firebug (and i'm sure theres something similar for chrome, too).

Upvotes: 1

mck89
mck89

Reputation: 19241

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.

Upvotes: 3

Related Questions