Lowdefy
v3.23.3/Operators/_or/

_or

(values: any[]): boolean

The _or operator performs a logical or over an array of inputs, using javascript truthy and falsy rules.

It returns true if any of the values in the array are truthy (not false, 0, null, undefined, or the empty string ""). If all the values are falsy, it returns false.

Arguments

array

An array of values over which to perform a logical or.

Examples

true and false values:
_or:
  - true
  - false

Returns: true

Array of true and false values:
_or:
  - true
  - false
  - false
  - false

Returns: true

Falsy values values:
_or:
  - null
  - 0
  - ''

Returns: false

Truthy values:
_or:
  - false
  - "Hello"

Returns: true

_or:
  - false
  - 99

Returns: true

_or:
  - false
  - [1,2,3]

Returns: true