# Variable declarations · Chromia Docs (concept)

> In Rell, local variables play a important role in storing and managing data within a specific scope.

Source: https://docs.chromia.com/rell/language-features/statements/local-variable/

# Variable declarations

On this page

* [Constants in Rell](#constants-in-rell)
* [Variables in Rell](#variables-in-rell)

In Rell, local variables play a important role in storing and managing data within a specific scope. They provide a way
to temporarily hold values that can be manipulated, utilized, or referenced within a limited context.

### Constants in Rell

Constants are values that can't be changed after initiation. They may exist outside the scope of a function. They are
declared using the `val` keyword, followed by an identifier and an assigned value. Here are some examples:

Rell

```
val x = 123;
val y: text = 'Hello';

print(x);   // 123
print(y);   // Hello
```

### Variables in Rell

Variables are declared using the `var` keyword. However, unlike constants, variables allow for value modification within
their scope. They can't exist outside the scope of a function. Here are some examples:

Rell

```
var x: integer;
var y = 123;
var z: text = 'Hello';

print(y);   // 123
print(z);   // Hello
```

[View this page on docs.chromia.com](https://docs.chromia.com/rell/language-features/statements/local-variable/)Content mirrored from the live docs
