What is the role of throw statement in JavaScript?
Answers
Answered by
0
The try statement lets you test a block of code for errors. The catch statement lets you handle the error. The throw statement lets you create custom errors. The finally statement lets you execute code, after try and catch, regardless of the result.
Answered by
0
Hello mate!!☺️
JavaScript throw statement allows you to create and throw user defined exception. You can use throw statement with try catch statement. You can completely control program flow and generate the user define error messages.
Similar questions
English,
6 months ago
English,
6 months ago
Computer Science,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago
Chemistry,
1 year ago
Computer Science,
1 year ago