Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get any item in set js

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #set #js
ADD COMMENT
Topic
Name
1+9 =