-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
// Challenge 7
const intersection = (arrays) => {
return arrays.reduce((acc, curr) => {
return curr.filter(el => acc.includes(el));
});
};
// console.log(intersection([5, 10, 15, 20], [15, 88, 1, 5, 7], [1, 10, 15, 5, 20]));
Uncaught TypeError: curr.filter is not a function
Should be:
const intersection = (...arrays) => {
return arrays.reduce((acc, curr) => {
return curr.filter(el => acc.includes(el));
});
};
and similar error downside :)
dianagasper13, abhaasgoyal, alexdisdier and TarekVisch
Metadata
Metadata
Assignees
Labels
No labels