Data Structures: Perform a Union on Two Sets

Hello campers ,please can any one explain to me what I am missing here , I didn’t understand this challenge very well

function Set() {
// to see all  methodes inside the Set constructor visit the link below 
    // change code below this line
    this.union=function(arr){
     for(let i=0;i<arr.length;i++){
         this.add(arr[i]);
     }
     return collection;
    }
    // change code above this line
}

let obj1=new Set();
obj1.add(1);
obj1.add(2);
obj1.add(3);
console.log(obj1.values());
console.log(obj1.union([2,4,5])) // this works the output is [1,2,3,4,5]  2 is not repeated

https://learn.freecodecamp.org/coding-interview-prep/data-structures/perform-a-union-on-two-sets
they said that This method should take another Set what is the meaning of this
is this means that I can create an instance of constructor within it

I guess it means that arr is not an array, but a Set and therefore you must first get values of that set.
And you probably should return the Set itself.

Create another obj2 which is also a Set:
obj2 = new Set();
Then add elements into it.
Then call union method on obj1 with obj2 as the argument.