views:

128

answers:

2

I'm new to JScript coming from a C++ world.

I'm quite surprised that expressions are evaluated at run-time. What I mean is if I added a function and didn't provide its definition, the program would "crash" (in the debugger) when I run it.

It's also funny how I can just type gibberish anywhere and only at run-time the debugger would complain.

But the "live" page wouldn't!

Is there any JScript add-on tool that checks its syntax while we type? I'm currently using Aptana Studio.

Or is the debug button equivalent to compiling in the web world? But then what if you had million lines of code and some little function was not defined or misspelled? That's a scary thought to me. =S

+7  A: 

JSLint is considered by many to be the best syntax checker. I don't know that there is an add-in for your particular situation, but you should be able to add it to your build process pretty easily.

Update: Apparently there are some established techniques for integrating it with Aptana.

RedFilter
You'll find it here http://www.jslint.com/
rikh
I've been using JSLint heavily, and it's just fantastic. It has saved me countless hours of work!!!
Bob Denny
+1  A: 

Welcome to the world of scripting!

Cheeso
+1 - This is the best way to put things, I am surprised the OP didn't know JavaScript was interpreted, and worse yet, sounds like he didn't even know such a thing existed.
Jason Bunting