Skip to content

union

union(arr1, arr2) → array · Array

Combine two arrays, removing duplicates. Returns all unique values from both.

  • arr1 (required): first array

  • arr2 (required): second array

utlx
union([1, 2, 3], [3, 4, 5])                // [1, 2, 3, 4, 5]
union(["A", "B"], ["B", "C", "D"])          // ["A", "B", "C", "D"]

Released under AGPL-3.0.