Skip to main content

$or

The $or operator evaluates multiple expressions and returns true if any of them are truthy, otherwise it returns false.

Input

  • An array of expressions to evaluate
  • Each expression is evaluated in order from left to right

Output

  • true if any expression evaluates to a truthy value
  • false if all expressions evaluate to falsy values

Examples

Basic Example

Result: true

Multiple Expressions

Result: true if the temperature is less than 0 OR greater than 100, otherwise false

All Falsy Values

Result: false