Tell us what’s happening:
Hi, the console here says that arr is 1,2,3,1,2,3. I thought it should be the 1, 2, 3, 1, 2, 3, 2, 3. Can someone tell me what have I misunderstood?
Your code so far
function destroyer(arr) {
console.log(arr)
return arr.filter(x => arr[0].includes(x) && !arr.includes(x));
}
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/72.0.3626.121 Safari/537.36
.
Link to the challenge: