Tell us what’s happening:
Can you take a look on my code for this project? i got 3 out 5 tests correct, it doesn’t make sense with others two. Can anybody explain?
Your code so far
function destroyer(arr) {
// Remove all the values
for(i=1;i<arguments.length;i++){
for(j=0;j<arr.length;j++){
if(arguments[i]==arr[j]){
arr.splice(j,1);
}
}
}
return arr;//arguments[0];
}
destroyer([3, 5, 1, 2, 2], 2, 3, 5);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/seek-and-destroy