Sorted Union - Why doesn't my solution work?

When I test out my solution in CodePen, it passes all the tests. However, for some reason it doesn’t pass any of the tests when I run it using the freeCodeCamp interface. Can anyone point me in the right direction? Here is my code:

function uniteUnique(arr) {
  var merged = arguments[0].concat(...arguments);
  var mergedSet = Array.from(new Set(merged));

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

You need to return it instead of console logging it.

1 Like

Thank you so much! This saved me a lot of trouble, trying to figure it out.