Seek and Destroy : is it valid

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
   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:

It’s a valid way to solve the problem, but I would encourage you to give this challenge another shot and try solving it with the constraints that you are given. Working with what you’ve got rather than what you want is a common problem when it comes to problem solving with code.

1 Like

ok i will give it a try