API Reference

Returns an array of items that appear in all of the given arrays.

function intersection<T>(...arrs: T[][]): T[]

// Example:

const arr1 = [1, 2, 3, 4]
const arr2 = [3, 4, 5, 6]
const arr3 = [4, 5, 6, 7]
 
intersection(arr1, arr2, arr3) //=> [4]