Tell us what’s happening:
passed the test but inserted rest parameter as an argument.
Your code so far
function destroyer(arr, ...rr) {
// Remove all the values
let rs = arr.concat(rr)
let rt = rs.filter(a=>{
if(rr.indexOf(a) ==-1){
return a
}
})
console.log(rt);
return rt
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy