Web Technology I20805 marksException handling try catch
How exception handling is done in JavaScript? Write a JavaScript program that will handle an exception when an input number is divided by zero.
How exception handling is done in JavaScript? Write a JavaScript program that will handle an exception when an input number is divided by zero. [5]
Exception handling is a mechanism to handle runtime errors gracefully so that the normal flow of the program is not disrupted. JavaScript uses the try...catch...finally construct for exception handling. --- Keyword Purpose ------------------ try Wraps the code that might cause an error catch Catc...