-
Notifications
You must be signed in to change notification settings - Fork 0
Bool Type
Nathan Wiles edited this page Jan 29, 2022
·
3 revisions
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.
The syntax for if branching should be familiar:
if (true) {
print('should print');
}
if (false) {
print('should not print');
}
Nala Documentation
- Navigation
- Basics
- Primitive Types
- Constructing Types
- Builtins