Let's say I have something like this in my code. I'm limited since I can't use anything that has been added to JavaScript after 2015. Still if you know something that is really good I would like to hear from you anyway.
const map = new HashMap();
map.putAll(someData);
// let in code
let keys = map.keySet();
for (let i = 0; i < keys.length; i++) {
// Do something with each key e.g.
something(keys[i];
}
What would be the best way to go through these keys
because I try to avoid for
whenever it is possible since there is usually something faster.