Skip to main content

Comparison Operators

Compare two values and produce a bool result (true or false).


Operators

OperatorDescriptionExample
==Equal toa == b
!=Not equal toa != b
>Greater thana > b
<Less thana < b
>=Greater than or equala >= b
<=Less than or equala <= b

Examples

x is 10;
y is 20;

Print(x == y); // false
Print(x != y); // true
Print(x < y); // true
Print(x >= 10); // true

Usage in Conditions

if (score >= 90) {
Print("Grade: A");
} else if (score >= 80) {
Print("Grade: B");
} else {
Print("Grade: C");
}

Next Steps