if / else
Branching based on conditions.
Syntax
if condition do ... else ... end
Description
The if ... do ... else ... end structure is used. If true, the first block runs, otherwise else runs.
Example
Loading editor…
Expected output
Adult
When to use?
Simple decision making.