Skip to main content

if / otherwise

Conditionals use if with an optional otherwise branch. There is no else if keyword — nest another if inside the otherwise block instead.

if age >= 18
show "Adult"
otherwise
show "Minor"
note

The condition must evaluate to a boolean — comparisons and boolean expressions work directly, but you cannot write if x where x is an integer.