# Storage (/ink/storage)



<Callout type="info">
  You can read more about using variables in ink on the [official documentation](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#part-3-variables-and-logic).
</Callout>

***ink*** also supports variables, both temporary and global, storing numerical and content data, or even story flow commands. It is fully-featured in terms of logic, and contains a few additional structures to help keep the often complex logic of a branching story better organised.

In the ***ink* + Pixi’VN integration**, the variables `VAR` and `CONST` are equivalent to <DynamicLink href="/start/storage">variables in storage</DynamicLink> and the variables `temp` are equivalent to <DynamicLink href="/start/storage#temporary-storage">temporary variables in storage</DynamicLink>.

The name of the &#x2A;**ink*** variables corresponds to the key of a variable in the <DynamicLink href="/start/storage">storage</DynamicLink>.

Define [#define]

<Callout type="info">
  This functionality in Javascript/TypeScript corresponds to <DynamicLink href="/start/storage#default-storage-variables">"Default storage variables"</DynamicLink>.
</Callout>

You can define a variable in &#x2A;**ink*** with the following code:

```ink title="ink"
VAR myVariable = 42
```

Set [#set]

<Callout type="info">
  This functionality in Javascript/TypeScript corresponds to <DynamicLink href="/start/storage#set">`storage.set`</DynamicLink>.
</Callout>

You can set a variable in &#x2A;**ink*** with the following code:

```ink title="ink"
~ myVariable = 100
```

Get [#get]

<Callout type="info">
  This functionality in Javascript/TypeScript corresponds to <DynamicLink href="/start/storage#get">`storage.get`</DynamicLink>.
</Callout>

In ink, variables can be used for different purposes. For each of these purposes, the way to get the value of a variable is different.

```ink title="ink"
The value of myDuration is: {myDuration}
# show image bg /image.png with dissolve duration {myDuration}
{myDuration > 5:
    The duration is greater than 5.
- else:
    The duration is 5 or less.
}
```
