# Method

*noun*

say it: **“METH-ud”** **/ˈmɛθəd/**

A function stored on an object or a class, which you call with a dot, like cart.addItem().

## What is **Method** in JavaScript?

**Method** — A function that belongs to a class, called on an object with a dot.

```javascript
const order = {
    quantity: 2,
    describe() {
        return `${this.quantity} items`;
    }
};
```

## In a sentence

- “addSong is a **method** on the playlist, so I call it as playlist.addSong("Sunny Road").”

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

Updated: November 9, 2026

## In other subjects

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

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