Conditionals
Operators
Logical
| Operator | Description |
|---|---|
&& |
Evaluates as true only if both conditions are true |
|| |
Evaluates as true if either condition is true |
Relational
| Operator | Description | Example |
|---|---|---|
== |
Equal to | 1 == 1 -> true |
!= |
No equal to | 1 != 1 -> false |
> |
Greater than | 2 > 1 -> true |
< |
Less than | 2 < 1 -> false |
>= |
Greater than or equal to | 2 >= 1 -> true |
<= |
Less than or equal to | 2 <= 1 -> false |
Blocks
Block statements are similar to C++ & Java.
Logical Operators
Note
expOrbit uses short-cicuit evaluation for conditionals! In the example below, it will never check if 1 * 1 == 1 since the first check 1 + 1 == 2 will always be true.