Tell us what’s happening:
im having issues getting multiple arguments to work correctly. I can get test 2 to return [1] but not [1,1] from both
Your code so far
function destroyer(arr,...values){
for (let val of values) {
return arr.filter((val) => arr.splice(val));
}
}
console.log(destroyer([1, 2, 3, 1, 2, 3], 2, 3)) //expected [1, 1]
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Challenge Information:
Implement a Value Remover Function - Implement a Value Remover Function