My solution. It takes me 1 hour to get this done

Tell us what’s happening:

Your code so far

function destroyer(arr, ...arg) {
  let newArr = [];
  for (let i = 0; i < arr.length; i++) {
    if ((arg).indexOf(arr[i]) === -1) {

  return newArr;

destroyer([1, 2, 3, 1, 2, 3], 2, 3);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Seek and Destroy

Link to the challenge:

1 Like

Do you have a question?

Please do not post solutions to challenges as they may be seen by others who do not wish to see full working solutions.

If you want to discuss your solution you are welcome to but to do so please;

  1. surround your code with ` tags so the text is blurred
  2. tell us what it is you want to discuss

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.