passed all tests!

This commit is contained in:
Fredrik Uddenfeldt 2023-05-20 21:38:47 +02:00
parent 8d116ded28
commit 6d9ef80b72
1 changed files with 1 additions and 4 deletions

View File

@ -4,13 +4,10 @@ const removeFromArray = function([a, ...b], c, ...d) {
let firstArray = [a, ...b];
let secondArray = [c, ...d];
let combinedArray = [...firstArray, ...secondArray];
let removeDuplicates = [...new Set(combinedArray)]
let filterFirstArray = removeDuplicates.filter(n => !secondArray.includes(n))
let filterFirstArray = removeDuplicates.filter(n => !secondArray.includes(n))
return filterFirstArray;