# Polymorphism

Different objects answering the same method call in their own way.

## What is **Polymorphism** in JavaScript?

**Polymorphism** — Different objects answering the same method call in their own way.

```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

## In other subjects

- [Polymorphism in C#](https://www.ask-codey.com/glossary/polymorphism-c-sharp)
- [Polymorphism in Java](https://www.ask-codey.com/glossary/polymorphism-java)
- [Polymorphism in OOP](https://www.ask-codey.com/glossary/polymorphism-oop)

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