Error handling in JavaScript using try catch method

Ashik Mahmud
Nov 6, 2020

--

Each program goes off for blunder . at the point when we compose hundreads line of code yet one mistake happen in the code then the remainder of the code isn’t exucated. To keep away from this happen we use attempt get strategy . So from the outset we should realize what is mistake.

Error

The program may stop because of a mix-up in the program then we can call it mistake. On the off chance that any client give wrong info, at that point the program can be halted .Beside the worker can not give reaction right time at that point likewise happen mistake.

Error Handling

At the point when any mistake happen in any program then we use blunder taking care of to keep away from this. Since mistake taking care of makes simpler a client to execute to his program. so you don’t need to look into the plan when you compose and later keep up the code.

Try…Catch

The attempt proclamation permits you to characterize a square of code to be tried for blunders while it is being executed. The catch articulation permits you to characterize a square of code to be executed, if a blunder happens in the attempt block.

--

--

Ashik Mahmud
Ashik Mahmud

No responses yet