If Expression
Evaluates the expression
(the condition). If the result tests as truthy, the first block-expression
(the then body) is evaluated. Otherwise, if an if-expression-else
clause is present, the second block-expression
(the else body) is evaluated.
The whole expression results in one of the following values, in order:
The result of the then body.
The result of the else body, if an
if-expression-else
is present.The nil value.
Truthiness
Almost all values are considered truthy, with the following exceptions:
The nil value.
The
false
Boolean value.
Last updated