finally Block
A block that normally runs after try and catch whether an exception occurred or not.
What is finally Block in JavaScript?
finally Block — A block that normally runs after try and catch whether an exception occurred or not.
function reserve(seats) {
if (seats < 1) {
throw new Error("Seat count must be positive");
}
}
Level: Journeyman · More JavaScript terms at this level
Updated