expression or
expression
Both expressions yield boolean
s.
The or
operator evaluates to the logical OR of the given boolean values. Either one value or both values must be true
for the expression to evaluate to true
. If both values are false
, the expression will evaluate to false
.
The or
operator is not short-circuited. Both expressions will be evaluated to determine the truth value of the whole expression. (This has considerable implications if either expression calls a function that has side-effects. For a short-circuited version of the or
operator, use the |||
operator.)