Boolean or operator ||
is a short-circuit operator. If the left side evaluates to a true boolean (i.e., not 0), then the right side fails.
Likewise for boolean and operator &&
, if the left side is false (i.e. 0), the right side is not executed.
source
to share