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
Hash maps can be tricky, but quite useful. When iterating over one as you would an object, each key is a tuple with [key, value]:
for (let key of map) { console.log('Key is: ' + key[0] + '. Value is: ' + key[1]); }