Tell us what’s happening:
Describe your issue in detail here.
Your code so far
function uniteUnique(arr) {
const rest = [...arguments];
const result = [];
for (let i = 0; i < rest.length; i++) {
for (let j = 0; j < rest[i]; i++) {
if (!result.includes(rest[i][j])) {
result.push(rest[i][j]);
}
}
}
return result;
}
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Intermediate Algorithm Scripting - Sorted Union
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union**what’s wrong**