# Variables

Variables store values in the script. They can store many types and operate mathematical operations. They are declared with the `var` keyword and modified without the keyword.

Here is an example of declaring a variable named "word" being equal to "Hello"

{% code lineNumbers="true" %}

```
var word = "Hello"
```

{% endcode %}

Here are other examples:

{% code lineNumbers="true" %}

```
var word = "Hello"
var count = 10
var active = true
```

{% endcode %}

### Types of Variables

There are many types of variables that you can use, as seen below:

<table><thead><tr><th width="133">Type</th><th width="189">Example</th><th>Description</th></tr></thead><tbody><tr><td>String</td><td><code>"Hello"</code></td><td>Text, wrapped in double quotes (<code>" "</code>)</td></tr><tr><td>Number</td><td><code>34</code>, <code>3.1416</code></td><td>Integer or decimal number. No need for extra formatting.</td></tr><tr><td>Boolean</td><td><code>true</code>, <code>false</code></td><td>True or false value. No need for extra formatting.</td></tr></tbody></table>

### Variables Reassignment

You can reassign variables by "declaring" them without the `var` keyword AFTER their initial declaration.

Example:

{% code lineNumbers="true" %}

```
-- We assing the variable x and declare its equal to 5:
var x = 5

-- We can then reassign it (x) to 10:
x = 10
```

{% endcode %}


---

# 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://control-blocks-mod.gitbook.io/control-blocks-mod-docs/controlscript/variables.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.
