Tell us what’s happening:
what’s wrong with line 9 “includes not working as expected”
Your code so far
function uniteUnique(arr) {
let newarr = [];
for(let i=0;i<arguments.length;i++){
// console.log(arguments[i])
newarr.push(
arguments[i].map(element=>{
//console.log(element);
//debugger;
if(!newarr.includes(element)){
return element;
}
})
);
}
return newarr;
}
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
.
Link to the challenge: