Set.prototype.keys()
This
method returns an iterator that contain all the values in set
var countries = new Set(); countries.add("India"); countries.add("Australia"); countries.add("Canada"); countries.add("Germany"); var iter = countries.keys(); for(var country of iter){ console.log(country); }
Output
India
Australia
Canada
Germany
No comments:
Post a Comment