Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 558 Bytes

intersection.md

File metadata and controls

32 lines (20 loc) · 558 Bytes

arrays.intersection

intersection(arrays)

Intersection creates an array of unique values that are included in all given arrays

Arguments

  1. arrays (Array): input array(s)

Returns

(Array): an array containing the unique intersecting values between all input arrays

Example

const result = arrays.intersection([4, 2, 1], [2, 3, 4]));
console.log(result);
> [4, 2]