Can anybody find what is wrong with this code..please help

Can anybody find what is wrong with this code..please help
0.0 0

#1

Tell us what’s happening:

Your code so far


function uniteUnique(arr) {
   var num=[];
  for(var i=0;i<arr.length;i++){
    for(var j=0;j<arr[i].length;j++){
      if(!num.includes(arr[i][j]))
        num.push(arr[i][j]);
    }
  }

  /
   return num;
}

uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union


#2

The variable arr you’re working on catch just the first of the arrays^^
You can put a console.log(arr) after num=[] and read the console log in your browser ^^


#3

Ya…
but how to solve that…
in other online editor i tried similar code and it is working fine…


#4

Look closely at argument(s) passed to the function.
You are not passing an array of arrays, you are passing a varying number of arrays separated by commas.

Either one of these links would be helpful in formulating a solution