Value Keywords

Keywords that produce a constant value.

There are 3 value keywords. These return a constant (literal) value.

True

The keyword true produces a boolean (true) value.

All true values are equal.

bool = true
assert bool == true
assert bool

result = 5 == 5
assert result == true
assert result == bool

False

The keyword false produces a boolean (false) value.

All false values are equal.

bool = false
assert bool == false
assert !bool

result = 5 != 5
assert result == false
assert result == bool

Null

The keyword null produces an empty value.

All empty values are equal.

nothing = null
assert nothing == null

An empty value is printed as "null" in text or interpolation.

Last updated