Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Iterate Over Map Keys

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

// looping through the Map
for (let key of map1.keys()) {
  console.log(key)
}
Source by javascript.info #
 
PREVIOUS NEXT
Tagged: #javascript #Iterate #Over #Map #Keys
ADD COMMENT
Topic
Name
1+5 =