> For the complete documentation index, see [llms.txt](https://docs.newbot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.newbot.io/conversescript-syntax/variables.md).

# Variables

You must know that a variable is **unique to a user**. If we restart the script with another user (that is, with another username), the values ​​will be different.

### A local variable

Creating a variable is very simple.

```typescript
name = 'ana'
```

In a function:

```typescript
start() {
    name = 'ana'
}
```

This variable is local to the function. When this function is finished, the variables are deleted to free the memory.

### Global variable

A global variable can be used throughout the script. It belongs to the user. A global variable is prefixed with `$`

```typescript
$name = '' // initialization

start() {
    $name = 'ana'
}
```

### Display the variable in an output text

We can insert a variable into an output text:

```typescript
$name = 'ana'

start() {
   > Hello { $name }
}
```

## &#x20;<a href="#variables" id="variables"></a>
