Or Else Operator
Returns “true” if one or more Boolean expressions are true, but stops after the first true expression.
expression_1 Or Else expression_2
- An expression with the type
Booleanor that can change to
- An expression of a type compatible with
Or Else is almost the same as the operator
They are different when
expression_1 is true.
When this occurs,
expression_2 is not evaluated.
This is correct because if one expression is true, then the result is always true.
This is known as short-circuit evaluation.
||Then the result is|