Syntactic Sugar
ufLang supports the following syntactic sugar:
If a for
or if
statement does not contain brackets, it will, by default, consider the first line following it as the block to execute:
Example:
The same behavior applies to if
statements:
Example:
You can also use the ternary operator instead of an if
to assign a value:
Example:
This is equivalent to the following if
statement:
Example (with a classic if
):
Last updated