# Error

*noun*

say it: **“AIR-er”** **/ˈɛrər/**

An object JavaScript makes when something goes wrong, with a name such as TypeError and a message saying what happened.

## What is **Error** in JavaScript?

**Error** — An object describing a problem that interrupted normal execution.

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

## In a sentence

- “The **error** said TypeError: Cannot read properties of undefined (reading 'name').”

Level: Journeyman · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/error
