Tell us what’s happening:
Hello I´m stuck with this code, would appreciate some help. Thanks! Your code so far
function checkSet(set){
// Only change code below this line
var checkSet(set) = checkSet(new Set([1,2,3,4,5,6,7]));
// Only change code above this line
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.
Challenge: Use Spread and Notes for ES5 Set() Integration
I think I´m still missing something, here´s my code
function checkSet(set){
// Only change code below this line
var setToArr = [...new Set(1,2,3,4,5,6,7)]
console.log(setToArr)
return checkSet(new Set)
// Only change code above this line
}
I promise that you do not need to create a new variable.
You also do not need to hardcode these value here.
What if I wanted to call the function with different values than the test case like this checkSet(new Set([16,35,79,100]))
Your function should be able to accommodate a hundred different function calls with different values and still return the right answer.
So that is why it is not a good idea to hardcode these values.
You also do not need to call the function inside itself.
Your task is to return the spread operator on the set object that is being passed in the function.
This is the set object set