Returns elements that appear in both arrays. Preserves uniqueness and order from the main array.
intersection([2, 3])([1, 2, 3, 4]);// => [2, 3] Copy
intersection([2, 3])([1, 2, 3, 4]);// => [2, 3]
Element type
Array to intersect with
Array of common elements
Returns elements that appear in both arrays. Preserves uniqueness and order from the main array.
Example