# Private Field

*noun*

say it: **“PRY-vit FEELD”** **/ˈpraɪvət fiːld/**

A field in a class whose name starts with # (read "hash"), which only code inside that class can read or change.

## 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;
    }
}
```

## In a sentence

- “The balance is a **private field**, #balance, so code outside the class can't set it to a million.”

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

Updated: November 9, 2026

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