Skip to main content

intersection

_.intersection(arrays, arrays) # Ⓢ [Ⓣ][1] Ⓝ

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​

0.1.0

Arguments​

  1. arrays (Array): The arrays to inspect.
  2. arrays (Array): The arrays to inspect.

Returns​

(Array): Returns the new array of intersecting values.

Example​

_.intersection([2, 3], [2, 1]);
// => [2]