Sorted Union: Please review the solution!

This is my solution to the Sorted Union challenge. Any reviews and feedback would be greatly appreciated! :slight_smile:

function uniteUnique(arr) {
  var args = Array.prototype.slice.call(arguments);
  var joined = args[0];
  var filtered = [];
  
  // joining the multidimensional array into a single one
  for (var i = 1; i < args.length; i++) {
    joined = joined.concat(args[i]); 
  }
  
  // removing the duplicates from the joined array 
  for (var j = 0; j < joined.length; j++) {
    if (filtered.indexOf(joined[j]) == -1) {
      filtered.push(joined[j]);
    } else {
      continue;
    }  
  }
    
  return filtered;
}
1 Like

Thanks for the feedback @P1xt :slight_smile: I always appreciate yours the most! :slight_smile: