const
Create a constant.
const name = expressionDefines an immutable runtime value. In an fn body, an optional :type selects the native type.
Example
const answer = 6 * 7Syntax
<name:id> [":" <type:qualified-id>] "=" <value:expr>Example
const limit = 42Arguments
- —
- : —
- type — Optional native type.
- value — Constant expression; the value cannot be reassigned.