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