The "sorted-union" challenge broken?

The "sorted-union" challenge broken?
0.0 0

#1

The “sorted-union” challenge in the “Intermediate Algorithm Scripting” group seems to be broken. The tests should be passed as a multidimensional array but instead is passed as a couple arrays separated by commas. The function receives only the elements for the first array.

How it is:
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);

How it should be:
uniteUnique([[1, 3, 2], [5, 2, 1, 4], [2, 1]]);

Anyone know how the inform the admins?


#2

Not sure why you think the function should accept a multi-dimensional array. The instructions are pretty clear:

Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.

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

The above call is an example of a function taking two or more arrays.

The base skeleton code for the function is:

function uniteUnique(arr) {
  return arr;
}

but that does not mean you only have access to arr (the first argument passed into the function). You should check out the arguments object which will help you solve this challenge.


#3

My bad, You’re right. I forgot that arguments objects are a thing. I should probably just read through the challenges properly next time.

Thanks for the help.