The logical AND
and OR
operators follow the short-circuit evaluation strategy. Which means:
- they always evaluate their left operand before the right,
- the right operand is evaluated if and only if the left operand does not determine the result.
The equality operator evaluates both the left operand and the right operand, then compares those values. The order of evaluation of the two operands is undefined.