Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bool Type

Nathan Wiles edited this page Jan 29, 2022 · 3 revisions

Boolean Expressions

The following operators are supported for comparisons: < > ==:

const isGreater = 3 > 2;
const isLesser = 2 < 3;
const isEqual = 2 == 2;

The < and > operators are implemented for Number types, and the == operator is implemented for all assignable primitive types except Func.

The boolean literals true and false are also available.

Conditional Branching

The syntax for if branching should be familiar:

if (true) {
    print('should print');
}

if (false) {
    print('should not print');
}
Clone this wiki locally