The Javascript Set values()
method returns an Iterator object for the values in Set object.
It maintains the insertion order.
mySet.values();
Using values()
var mySet = new Set(); mySet.add('foo'); mySet.add('bar'); mySet.add('baz'); var setIter = mySet.values(); console.log(setIter.next().value); // "foo" console.log(setIter.next().value); // "bar" console.log(setIter.next().value); // "baz"