# Constants

Constants were introduced in ES6(2015), and use a `const` keyword. Variables that are declared with `const` cannot be reassigned or redeclared.&#x20;

### Example:

```javascript
const VERSION = '1.2';
```

### 📝 Task:

* [ ] Run the program mentioned below and fix the error that you see in the console. Make sure that the code result is `0.9` when it is fixed in the console.

```javascript
const VERSION = '0.7';
VERSION = '0.9';
console.log(VERSION);
```

### 💡 Hints:

* Visit the  [Variables](/js-101/basics/variables.md) chapter for more info about const and also look for "*TypeError assignment to constant variable*" in search engines to learn a fix.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://js201.gitbook.io/js-101/console/constants.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
