4 lines
85 B
JavaScript
4 lines
85 B
JavaScript
module.exports = (a, b) => {
|
|
const s = new Set(b);
|
|
return a.filter(x => s.has(x));
|
|
}; |