# intersection
Useimport { intersection } from 'util-snippets'
/**
* Example:intersection([1, 2, 3], [4, 3, 2]); // [2, 3]
*/
intersection(array1,array2)
const intersection = (a: [], b: []) => {
const s = new Set(b);
return a.filter(x => s.has(x));
};