HashMap implemented in Javascript