Corrected fourth exercise

This commit is contained in:
octopusGarden 2022-10-31 14:12:07 -04:00
parent 353884775e
commit 7b3d057517
1 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,9 @@
const removeFromArray = function(list, item) {
//Remove third element from array
let remove = list.filter(item);
return list;
const removeFromArray = function(list, ...remove) {
let result = list.filter(item => !remove.includes(item));
return result;
};
// Do not edit below this line