13 lines
297 B
JavaScript
13 lines
297 B
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
function intersection(firstArr, secondArr) {
|
|
const secondSet = new Set(secondArr);
|
|
return firstArr.filter(item => {
|
|
return secondSet.has(item);
|
|
});
|
|
}
|
|
|
|
exports.intersection = intersection;
|