The syntax for Try Catch
try {
// Your Statement
} catch (e) {
// Use catched error 'e'
}
Catch block gets executed Only if, the statements in try block generates an error
The syntax for Try Catch
try {
// Your Statement
} catch (e) {
// Use catched error 'e'
}
finally {
// This code execute after try catch blocks
}
finally block gets executed all the times after try, catch blocks, without considering output or exceptions from above try catch blocks