Variables
Declaring and using variables with let and const.
Declare variables with let (mutable) or const (immutable):
let x = 10
let name = "Gor"
const PI = 3
# let can be reassigned
x = 20
# const cannot be reassigned — this would error:
# PI = 4Variables declared with let can optionally omit the initializer (defaults to null):
let y
print(y) # nullVariables declared with const must have an initializer.