React Iterate nad mapą

//function which will be passed as argument to (Map.prototype.forEach())
function logMapElements(value, key, map) {
    console.log(`map.get('${key}') = ${value}`)
}
//create the map object and use forEach to loop through the keys in the map 
// and get the value associated with each value
new Map([['foo', 3], ['bar', {}], ['baz', undefined]]).forEach(logMapElements)
//Output:
// "map.get('foo') = 3"
// "map.get('bar') = [object Object]"
// "map.get('baz') = undefined"
hritick bhushan