# Let and Const

**Let** is a variable type that cannot be redeclared multiple times, any other declaration will result a syntax.

## When should you use Let?

You should use let when you know that the value you are setting should not change, If the Variable you want is strictly going to be for one specific value, then Let or Const is the variable type you should use since you do not want to redeclare them.

### Diference between Let and Const

Constant can be declared only one time and not be changed, for example server ID.

Let will last for each event, for example Interaction author.

For example I have set my name to John, since I want John to be the fixed value that cannot be changed.

<figure><img src="/files/gecNqBbeMTjXLtPWY2fc" alt=""><figcaption><p>Example of Let usage</p></figcaption></figure>


---

# 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://docs.scratch-for-discord.com/use/toolbox/functions/variables/let-and-const.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.
