or() Function

Function

or( value )

Returns true if any inputs are true; returns false if all inputs are false.

Parameters

Keyword Type Description

value

Boolean

A value or array of values that must be false for the function return false.

Returns

Boolean

Usage considerations

Casting and returning boolean values

  • Arguments are cast to Boolean before or() evaluates.
  • As soon as the returned value of a value evaluation returns true, the function returns true.

Evaluation order and performance

  • Multiple arguments are evaluated left-to-right.
  • Keep common conditions on the left and complex edge cases on the right to improve function performance. If an earlier simple function returns true, the later edge cases don't need to be evaluated.

Null and empty arrays

  • Null values that are part of input arrays are filtered out before evaluation.
  • Empty arrays evaluate to false.
  • Empty text strings in a text array evaluate to false, but empty text strings in an array with multiple data types are considered null values and are filtered out before evaluation.

Examples

You can experiment with this function in the test box below.

Test Input

Use functions to Pass Multiple Logical Values:

or(isleapyear(1996),isleapyear(1997)) returns true

Pass an Empty Array:

or({}) returns false

Pass an Array of Numbers:

or(1,2,"",3) returns true

or(0,1,2,"",3) returns true

Open in Github Built: Fri, Oct 22, 2021 (11:11:24 AM)

On This Page

FEEDBACK