How does exception handling work in JavaScript?

Jayesh Nazre

With JavaScript version 1.4+, you can use try catch finally blocks to catch and throw your own exceptions. For further reference visit the docs for: try...catch Versions of JavaScript prior to "1.4" did not give any control for the user to handle exceptions.