# Variables

A variable never changes unless you write `var mut`, and every variable
states its type ([Values and types](values-and-types.md)).

```jadpo
var needed: Stock = stock_needed(per_pack, packs)
var mut total: Stock = needed
total = Stock(total + holdback)
```

- `var` names a value that never changes. `var mut` names one you can
  point at a new value of the same type, with `name = value`.
- Only a `var mut` local can be assigned. Parameters, fields and
  declarations can't, because values never change
  ([Values never change](values-never-change.md)).
- A variable is visible from where it is declared to the end of its block.
- A name already in scope, a parameter included, can't be declared again.
- A variable nothing reads is an error.
