There are three different types of error that can occur with JavaScript.
These are:
Loading Errors where an error results in your JavaScript being unable to load into the browser in the first place.
Runtime Errors where the JavaScript loads and starts to run and then crashes when it reaches a statement that it is unable to process.
Logic Errors where the script runs but doesn't do what it is supposed to do.