Error handling of Javascript

If you are a programmer then an error is your best friend, Isn’t that so? The error will stay with you. But it is the job of the programmer to solve this error. If an error can be seen then not working web application. Because of something error handling is very important. We will discuss this below.

  1. try statement: If there is a possibility of any error then that must be placed inside this try state block.

2. catch statement: If when there is any an error inside the try statement then catching errors thrown catch statement. reality error handle is to do in this catch statement.

3. throw statement: With this throw statement, we can make a custom error message.

4. finally statement: The code will work in this finally statement will always work. Error whether or not.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Akbor Hossain Rifat
Akbor Hossain Rifat

Written by Akbor Hossain Rifat

Hi There, MERN-Stack ,JavaScript ,TypeScript , React.js , Node.js , MongoDB , MySQL , WordPress Developer. Simplifying fullStack development for you.

No responses yet

Write a response