I\'m using this method to make artificial \'hashmaps\' in javascript. All I am aiming for is key|value pairs, the actual run time is not important. The method below works fi
This is an old post, but one way I can think of is
const someMap = { a: 1, b: 2, c: 3 }; Object.keys(someMap) .map(key => 'key is ' + key + ' value is ' + someMap[key]);
Should this way of iterating be used? Are there any issues with this approach?