# `syntax.variable_keyword`

Variable declared with `let`, `const` or `val`.

Area 3, [Logic](../topics/logic.md); not declinable; the next step is usually the agent's.

A variable is `var name: Type = value`, or `var mut` when it can change.

```jadpo
type Count = Int {
    min: 0
}

function same(count: Count) -> Count {
    let kept: Count = count
    return kept
}
```

```text
error: Jadpo writes `var`, not `let`
 --> main.jadpo:6:5
  |
6 |     let kept: Count = count
  |     ^^^ write `var`
  reason: `let` declares a variable in JavaScript, TypeScript, Swift and Rust; a Jadpo variable is `var name: Type = value`, or `var mut` when it can change.
  next: Use `var` instead of `let` (agent)
  rule: syntax.variable_keyword
  help: https://jadpo.dev/docs/errors/syntax.variable_keyword

check failed: 1 error, 1 file
```
