MSDN references JavaScript\'s Set collection abstraction. I\'ve got an array of objects that I\'d like to convert to a set so that I am able to remove (.delete()
Just pass the array to the Set constructor. The Set constructor accepts an iterable parameter. The Array object implements the iterable protocol, so its a valid parameter.
var arr = [55, 44, 65];
var set = new Set(arr);
console.log(set.size === arr.length);
console.log(set.has(65));