Tell us what’s happening:
Describe your issue in detail here.
Can someone tell me why my code does not work. Thank you
**Your code so far**
function destroyer(arr) {
let objToArr = Array.from(arguments);
let optionalArgs = objToArr.slice(1,3);
return arr.filter(function(num) {
return optionalArgs.indexOf(num) === -1;
});
}
console.log(destroyer([3, 5, 1, 2, 2], 2, 3, 5));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Challenge: Intermediate Algorithm Scripting - Seek and Destroy
Link to the challenge: