# const

*noun*

say it: **“KONST”** **/kɒnst/**

A JavaScript keyword for a variable that can't be given a new value.

## What is **const** in JavaScript?

**const** — A keyword that declares a block-scoped variable that can't be given a new value. An object or array it
holds can still change.

```javascript
const taxRate = 0.08;
taxRate = 0.1;          // TypeError: Assignment to constant variable.

const cart = [];
cart.push("coffee");    // allowed: the array changes, the variable doesn't
```

## In a sentence

- “I declared the tax rate with **const**, so it can't be reassigned.”

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

Updated: November 9, 2026

## In other subjects

- [const in C#](https://www.ask-codey.com/glossary/const)

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