Creates an array of unique values that are included in all given arrays using SameValueZero for equality comparisons. The order and references of result values are determined by the first array.
SameValueZero
5.11.0
intersection([2, 1], [2, 3])// => [2] Copy
intersection([2, 1], [2, 3])// => [2]
Rest
The arrays to inspect.
Returns the new array of intersecting values.
Creates an array of unique values that are included in all given arrays using
SameValueZero
for equality comparisons. The order and references of result values are determined by the first array.Since
5.11.0
Example