# Private Field

A class field beginning with # that is accessible only inside its declaring class.

## What is **Private Field** in JavaScript?

**Private Field** — A class field beginning with # that is accessible only inside its declaring class.

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

Source: https://www.ask-codey.com/glossary/private-field
