Script termination (Definition)

The act of halting the execution of a script.

Scripts may terminate in an expected and normal way or abnormally due to some problem. The predominant reason for premature aborts of scripts is some kind of programmer error, most likely a syntax error or a reference to a non-existent object.

Web browsers behave in different ways and you may be able to add development tools around the browser to catch the exception as it happens and carry out some debugging.

Generally speaking the debugging tools for JavaScript are weak by comparison with those that you use with a compiled language. Some environments provide better tools than others do.

See also:Environment, Error handling, Execution environment, Script, Script execution, Storage duration