Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Function: excluded()

Returns an Array of all items in one Array that are not contained within another Array.

Syntax

excluded(arrayA, arrayB)

ArgumentTypeDescription
arrayAArrayAn Array of values of any type.
arrayBArrayAn Array of values of any type.

Returns an Array of all items that are in arrayA that are not in arrayB.

Examples

excluded(
["a","b","c", "d","e"],
["a", "c","f","d" ]
)

Returns the Array ["b","e"], as do the three expressions below:

...

excluded(["a","b","c","d","e","e"],["a", "c","f","d"])

returns

["b","e","e"].

To be clear, if an element in the first array (array A) exists at all in the comparator array (array B), then it will not count as excluded:

...