Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy: with indexOf

Hello,
The solution 1 is made with indexOf().
If you have comments ?

function destroyer(a, ...arr) {
  solution1

  const [a,...arg] = [...arr];
  const result = [];
  for (let i = 0; i < a.length; i++) {
    if (arg.indexOf(a[i]) == -1 ) {
      result.push(a[i])
    } 
  }
  return result  
  
/*//Solution2
  const [a,...b] = [...arr]
  let bigArr = a.concat(b);
  return bigArr.filter( item => !b.includes(item));*/
}

console.log(destroyer([1, 2, 3, 1, 2, 3], 2, 3));

Do you have a question?