It doesn't need to be compiled at all. If you want to debug your scripts, ScriptDebugger or Visual Interdev will be quite excellent debugger tools.
The mere fact that some languages as C++ ,VB, C# and so on need to be compiled before run them is insufficient evidence to conclude that each language do yourself.
Scripts such as JScript ,Javascript and vbscript have a parser in the browser, so you needn't worry about its carrying out.