This is my solution to the Sorted Union challenge. Any reviews and feedback would be greatly appreciated!
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;
}