Data structure use spread operator

What is your hint or solution suggestion?
function checkSet(set){

checkSet(newset[1], set[2], set[3], set[4], set[5], set[6], set[7]);

return checkSet(…checkSetset);

output error

Challenge: Use Spread and Notes for ES5 Set() Integration

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help

I would suggest reading through the example code they gave you because it will help you with getting the correct answer.

function checkSet(set){

checkSet = [ Set(1,2,3,4,5,6,7)]


return checkSet(new Set)


but ouput is nothing
output : // running tests

checkSet(new Set([1,2,3,4,5,6,7])

should return

[1, 2, 3, 4, 5, 6, 7]

. // tests completed

So you don’t need to create a new Set because in the function call for the test here

checkSet(new Set([1,2,3,4,5,6,7])

a new Set was already created.

For this challenge, you need to write one line of code which is to use the spread operator on the set parameter.

I would suggest reseting the lesson and trying that.
Hope that helps!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.