Logical Operators
Logical operators test the truth value of a pair of operands.
The logical conjunction operator
and
tests if two expressions are both true. Even thought the first expression is false, the second expression will be evaluated.
The logical disjunction operator
or
tests if at least one of two expressions it true. Even thought the first expression is true, the second expression will be evaluated.
You can prepend a logical expression with a negation operator
!
to flip the truth value. The logical expression must be between parenthesis.
Last updated
Was this helpful?