javaCRIPT GET FIRST VALUE IN SET code example
Example 1: js set get first value
set.values().next().value
Example 2: javascript get first entry from set
var x = new Set();
x.add(1);
x.add({ a: 2 });
//get iterator:
var it = x.values();
//get first entry:
var first = it.next();
//get value out of the iterator entry:
var value = first.value;
console.log(value); //1