Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Iterate over map in javascript

let map = new Map();
map.set('key1', 'value1');
map.set('key2', 'value2');
for (let [key, value] of map.entries()) {
    console.log(key + ' - ' + value)
}
Source by javascript.info #
 
PREVIOUS NEXT
Tagged: #Iterate #map #javascript
ADD COMMENT
Topic
Name
9+8 =