Or operation
Learn how to check if at least one condition is true.
The logical or operation evaluates to true when at least one of the operands is true and false otherwise.
To use the or operator, place a || sign between two expressions:
/*<value>*/ || /*<value>*/
For a more natural language feel, you can use or:
/*<value>*/ or /*<value>*/
Here is a practical example:
true or false // true
Note that the or operation has lower precedence than the and operation:
true or false and false
The above expression is equivalent to the following:
true or (false and false)
In other words, the and operation is evaluated first, and the result is used as the second operand of the or operation.