Errors are thrown by the engine, and exceptions are thrown by the developer.But what exactly does this mean?
In JavaScript, all exceptions are simply objects while the majority of exceptions are implementations of the global Error class.
There are two ways to throw an exception:
1. Directly via an