Hey Community !
I dont understand why freecodecamp doesn’t validate my answer. When computing this on my IDE, the returned array matches the expected answer.
Any suggestions as to why it doesn’t work ?
Your code so far
function destroyer(arr) {
for (let i = 1 ; i < destroyer.arguments.length ; i++ ){
arr = arr.filter((data) => data !== destroyer.arguments[i])
}
return arr;
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
.
Challenge: Seek and Destroy
Link to the challenge: