The basic assignment operator is =:
let x = 10
Compound assignment combines an operation with assignment:
let x = 10
x += 5 // Same as x = x + 5 → 15
x -= 3 // Same as x = x - 3 → 12
x *= 2 // Same as x = x * 2 → 24
x /= 4 // Same as x = x / 4 → 6
x %= 4 // Same as x = x % 4 → 2
These shortcuts make code shorter and clearer when modifying a variable.