title: How do i concat arrays with unknown amount of arguments
body: <p>So I have my function uniteUnique. It should get the arguments and concatonate them to a single array. If there would be a specific amount of arguments for example 3, i would implement it like the function bellow</p>
  
  <pre><code>function uniteUnique(arr) {
    var args = [];
    var newArgs;
   for (var i = 0; i &lt; arguments.length; i++) {
      args.push(arguments[i]);
      newArgs = args[0].concat(args[1], args[2]);
    }
    return newArgs ;
  }
  
  uniteUnique([1, 3, 2], [1, [5]], [2, [4]]);
  </code></pre>
  
  <p>But what if uniteUnique function would have 2 arguments or any other number.</p>
  
  <pre><code>uniteUnique([1, 2, 3], [5, 2, 1])
  </code></pre>
  
  <p>How to make my function know how many arguments it should concatonate, and how would it be implemented inside the concat() function ?</p>
  
  <p>EDIT:</p>
  
  <p>Output should look like this:</p>
  
  <p><code>uniteUnique([1, 3, 2], [1, [5]], [2, [4]])</code>  should return <code>[1,3,1,1,[5],2,</code>[4]]<code>and uniteUnique([1, 2, 3], [5, 2, 1])</code> should return <code>[1,2,3,5,2,1]</code></p>