passed all tests!
This commit is contained in:
parent
8d116ded28
commit
6d9ef80b72
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue