# Getter

A method that returns an object's stored value.

## What is **Getter** in JavaScript?

**Getter** — A method that returns an object's stored value.

```javascript
class Thermostat {
    #temperature = 20;

    get temperature() {
        return this.#temperature;
    }
}
```

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

Updated: September 27, 2026

## In other subjects

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

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