Edit

Logical (Boolean) Operators

Use logical operators to build compound conditions.

SymbolOperationUsage
And, &, &&conjunctionA and B
The result is true if both A and B are true, or false if one is false.
Or, |, ||disjunctionA or B
The result is true if either A or B is true, or false if both are false.
Not, !negationnot A
Returns the logical negation of A.?The result is true if A is false. The result is false if A is true.