What Are Errors?

Things do not always work the way you want. When something goes wrong, we get notified via an error. This error can either be thrown by the JavaScript engine or a developer.

Any developer should be quite familiar with the concept of errors. Front end developers would definitely be familiar with the alarming red text notifying errors on their browser consoles when running their web applications.

The terms error and exception are used often in the programming world. But more often than not, they are used interchangeably. Although subjective, I consider errors to be thrown by the JavaScript engine while exceptions are thrown by developers. This might not be the case in languages such as Java where errors belong to the unchecked type and occur at runtime while exceptions can occur either in runtime or compile time.

You can read more about errors and exceptions in Java over here.

#javascript #web-development #react #programming #developer

Errors and Error Handling in JavaScript
1.85 GEEK