= — initialization and assignment

Syntax and values

Behavior and details

A single = separates target and value in let and set. It is not an expression operator; plain name = value is invalid. Use == to compare. The right-hand value is evaluated before assignment-target indices.

Example

# language: en
let score = 1
set score = score + 1
say score == 2

Syntax and values · Built-ins · Programming guides