JavaScript hashmap equivalent

前端 未结 17 1219
执笔经年
执笔经年 2020-11-22 13:23

As made clear in update 3 on this answer, this notation:

var hash = {};
hash[X]

does not actually hash the object X; it actually

17条回答
  •  隐瞒了意图╮
    2020-11-22 14:18

    There are some really great solutions nowadays with external libraries:

    • collections.js
    • Immutable.js

    JavaScript also has its language-provided Map as well.

    • Map

提交回复
热议问题