# 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.

```javascript
function reserve(seats) {
    if (seats < 1) {
        throw new Error("Seat count must be positive");
    }
}
```

Level: Journeyman · [More JavaScript terms at this level](https://www.ask-codey.com/glossary/subjects/javascript/journeyman)

Updated: September 27, 2026

## In other subjects

- [finally Block in C#](https://www.ask-codey.com/glossary/finally-block-c-sharp)
- [finally Block in Java](https://www.ask-codey.com/glossary/finally-block)

Source: https://www.ask-codey.com/glossary/finally-block-javascript
