Is it possible in JavaScript to use try/catch/finally without a catch block?
Yes, it is acceptable. But a try without a catch clause sends its error to the next higher catch, or the window, if there is no catch defined within that try. If you do not have a catch, a try expression requires a finally clause.

try {
    // whatever;
} finally {
    // always runs

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes