Sorted Union - Code works (I think?) But will not pass tests

Hello, I believe I have written some code that while not elegant does pass all of the test cases for Sorted Union. However, when I submit the code I do not see that any of the test cases have registered as a pass. Could someone explain to me a) why this is the case or b) why my code is defective? Please see below and thank you in advance!

function uniteUnique(arr) {
  var arr = [];
  var unique = [];
  for (var i = 0; i < arguments.length; i++){

  for (var i = 0; i < arr.length; i++){
    for (var j = 0; j < arr[i].length; j++){
      if (unique.indexOf(arr[i][j]) === -1){
  return unique;

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

Try with a New Windows Incognito in Chrome.

When I pasted your code in FCC editor I go two warnings (yellow triangles). Correct them.

Thanks jenovs,

It seems like it did not like my reassignment of arr on line 2.