Remove items from a set in ES6

function checkSet(){
// Only change code below this line
var set = null;
var set = new Set([1,2,3,4]);
set.delete(2,5);
console.log([…set]) // should return [ 2, 3 ]
// Only change code above this line
return set;
}

Challenge: Remove items from a set in ES6

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!

The delete method takes a single value as the argument, not a list of arguments.

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