ES6 - Map Method values


Advertisements


This function returns a new iterator object referring to the values in the Map.

Syntax

myMap.keys()             

Return Value

Returns an Iterator object

Example

var myMap = new Map(); 
myMap.set("id", "admin"); 
myMap.set("pass", "admin@123"); 

var itr = myMap.values(); 
console.log(itr.next().value); 
console.log(itr.next().value);

Output

Admin 
admin@12  

es6_collections.htm

Advertisements