Description

Create an array of unique values, in order, from all given arrays

Syntax

union(array1, array2, arrayN)

Parameters

Input ParameterTypeDescription
array1ArrayThe array to inspect.
array2ArrayThe array to inspect.
arrayN (optional)ArrayThe array to inspect.

Return value

Type
Array

Sample

ExampleResultDescription
union([2, 3], [1, 2])[1,2, 3]Returns union for the two arrays
union([2, 3], [1, 2], [3, 4])[1,2, 3, 4]Returns union for the three arrays

To view all the List functions, click here.