Problem with Sorted Union Challenge

Hi, my name is Jacob and this is my first post on this forum.

I started to camp about a week ago and it’s a first time when I’ve got stucked and I don’t see light at the end of the tunnel :stuck_out_tongue:

I made some code for Sorted Union challenge and it seems to work but don’t for some reason. After i run the code I get the answer in output window which for what I can tell is correct but isn’t validated for some reason. I can only think that it is some problem with data type which i can’t see. I would be grateful if someone more experienced could look at the code and tell me where is the bug?


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

The logic works, but it seems you can’t directly use arguments. You have to somehow transform it to a proper array.

Big thanks for reply
After some investigation i discovered that indeed I need to convert arguments to real array with Array.from(arguments); method.:ok_hand: