Learn JavaScript
Lesson 1 - Introduction To JavaScript
Lesson 2 - Basic JavaScript Syntax
Lesson 3 - Control Flow
Lesson 4 - Functions
Lesson 5 - Basic Data Structures
Lesson 6 - Basic String Operations
Lesson 7 - Basic Array Operations
Lesson 9 - Packages
Lesson 10 - User Input
Exceptions are errors or unexpected events that interrupt the normal execution of a program.
For example, if we try to divide a number by zero, this will show an error.
But you don't have to worry about it!
JavaScript introduces an amazing solution for handling exceptions and maintaining normal execution of your program even if an error occurs.
For example:
console.log(a / 10);
The above line of code will generate an error because the variable a
isn't defined.
Benefits of Handling Exceptions Handling exceptions provides you with the following benefits: