pxt-calliope/docs/reference/logic.md
2016-04-13 08:27:45 -07:00

415 B

Logic

if

if(true) {
}

Boolean values: true; false

true
false

Boolean binary operators: and (conjunction); or (disjunction)

true && false;
true || false;

Boolean negation operator

!true

Comparison operators (=, !=, <, >, <=, >=)

0 == 0;
1 !- 0;
0 < 1;
1 > 0;
0 <= 1;
1 >= 0;