# extends

A keyword that makes one class inherit from another.

## What is **extends** in JavaScript?

**extends** — A keyword that makes one class inherit from another.

```javascript
class Alert {
    text() {
        return "Alert";
    }
}

class EmailAlert extends Alert {
    text() {
        return "Email";
    }
}
```

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

Updated: September 27, 2026

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