# let statement

The let statement assigns the value
of an expression to a variable.

## Syntax

```
{let} var = exp
```

## Parameter(s)

| var | Variable that is assigned the value of exp. Can be a simple variable, an array element, an extraction, substring, or both extraction and substring. |
| --- | --- |
| exp | Value to be assigned to var. |

## Description

The let statement
is a holdover from the original Dartmouth BASIC, and is only included
for compatibility. It is supported to facilitate program readability.

## Example(s)

```
let a = 5
```
The statement above is exactly the same as:

```
a = 5
```

## See also

- [= assignment operator](https://d3codex.com/pickbasic-flashbasic/equals-assignment-operator/)
- [Assignment](https://d3codex.com/pickbasic-flashbasic/assignment/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/let-statement/ - part of the D3Codex reference.
