相关疑难解决方法(0)

如何在JavaScript中进行关联数组/散列

我需要使用JavaScript存储一些统计信息,就像我在C#中这样做:

Dictionary<string, int> statistics;

statistics["Foo"] = 10;
statistics["Goo"] = statistics["Goo"] + 1;
statistics.Add("Zoo", 1);
Run Code Online (Sandbox Code Playgroud)

JavaScript中是否有Hashtable类似的东西Dictionary<TKey, TValue>
我怎么能以这种方式存储价值?

javascript dictionary hashtable

548
推荐指数
9
解决办法
71万
查看次数

任何人都可以在Javascript中推荐一个好的Hashtable实现吗?

我发现jCache和其他一些使用关联数组的本土方法.如果您有使用jCache的经验,是否有任何限制?

javascript dictionary associative-array hashtable

28
推荐指数
0
解决办法
1万
查看次数