$k. Arrays

Methods

(static) intersection(varargs) → {Array.<object>}

Returns a new array containing the intersection of all array elements. Comparison is based on an internal object equality algorithm.

Parameters:
NameTypeDescription
varargsarray

The arrays to join

Version
  • Experimental feature, might be removed at any time
Since
  • 5.3.1
Returns:

A new array. Empty if no arguments are supplied.

Type: 
Array.<object>

(static) union(varargs) → {Array.<object>}

Returns a new array containing all elements of the arrays once (unlike Array.prototype.concat). Does not preserve the order. Comparison is based on an internal object equality algorithm.

Parameters:
NameTypeDescription
varargsarray

The arrays to join

Version
  • Experimental feature, might be removed at any time
Since
  • 5.3.1
Returns:

A new array. Empty if no arguments are supplied.

Type: 
Array.<object>