Skip to content

intersection

Subhajit Sahu edited this page Mar 17, 2020 · 26 revisions

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');

array.init([1, 2, 3]);
// [1, 2]

array.init([1]);
// []

references

Clone this wiki locally