included

Function: included()

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

Syntax

included(setA, setB)

ArgumentTypeDescription
setAArrayAn Array of values of any type.
setBArrayAn Array of values of any type.

Returns an Array of all items that are in setA that are also in setB.

Examples

included(["a","b","c"],["a", "c","f","d"])

Returns the Array ["a","c"].

See Also