Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Iterate Through a Map

let map1 = new Map();
map1.set('name', 'Jack');
map1.set('age', '27');

// looping through Map
for (let [key, value] of map1) {
    console.log(key + '- ' + value);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #Iterate #Through #Map
ADD COMMENT
Topic
Name
7+4 =