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

# Variables

Variable declaration looks like this:

```kotlin
var x = 42;
```

We can specify type of variable like this:

```kotlin
var x: int = 42;
```

### Zero initialized variables (undefined)

To create "undefined" variable you need use `undefined` keyword:

```kotlin
var x: int = undefined;
```

This code will allocate space in function stack for variable but doesn't initialize `x` with some value.

### Compile-time variables

Jazz allows you declare compile-time variable. You need use `comptime` keyword before `var`

```kotlin
comptime var x = 42;
```

You can't assign to `x` in non-compile-time context, you should use `comptime` keyword before assignment:

```kotlin
comptime x = 0;
```
