The catch statement allows you to define a block of code to be executed if an error occurs in the try block.
The try and catch keywords come in pairs:
|
|
myNumbers[10] does not exist.
try...catch to catch the error and execute some code to handle it:
|
“The measure of intelligence is the ability to change.” ― Albert Einstein |