If / Else

Conditions determine the behavior of the system based on specific criteria.

Creating if / else conditions

Syntax

If/Else Synthax:

if <condition> <block> else <block>

<condition> Synthax:

<variable> <comparison-operator> <variable>

Example:

var i = 92;

if (i < 100) {
    printuf("i is less than 100");
} else {
    printuf("i is greater than 100");
}

Last updated