We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Gives values of an array present in another.
array.intersection(x, y, [fn]); // x: an array // y: another array // fn: compare function (a, b)
const array = require('extra-array'); var x = [1, 2, 3, 4]; array.intersection(x, [2, 3, 5]); // [2, 3] array.intersection(x, [-2, -3, -5], (a, b) => Math.abs(a) - Math.abs(b)); // [2, 3]
There was an error while loading. Please reload this page.