Skip to content
Advertisement

Tag: hashmap

Loop through a ‘Hashmap’ in JavaScript

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 fine. Are there any other ways to loop through this? I run into a problem where this outputs a bunch of undefined keys after the first key, when the array only

Advertisement