> For the complete documentation index, see [llms.txt](https://docs.scratch-for-discord.com/use/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scratch-for-discord.com/use/toolbox/functions/variables/let-and-const.md). Agents can also search and read this documentation through its [MCP server](https://docs.scratch-for-discord.com/use/~gitbook/mcp).

# 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="https://2077548579-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3xg7dEw96L10OHOz0yDz%2Fuploads%2Fgit-blob-a64d9e19ffcadb34f081d1c40e38b8ffe7409b02%2Fscreenshot%20(81).png?alt=media" alt=""><figcaption><p>Example of Let usage</p></figcaption></figure>
