I need to store some statistics using JavaScript in a way like I'd do it in C#:
(我需要使用JavaScript来存储一些统计信息,就像在C#中那样:)
Dictionary<string, int> statistics;
statistics["Foo"] = 10;
statistics["Goo"] = statistics["Goo"] + 1;
statistics.Add("Zoo", 1);
Is there an Hashtable
or something like Dictionary<TKey, TValue>
in JavaScript?
(JavaScript中是否有Hashtable
或类似Dictionary<TKey, TValue>
类的东西?)
How could I store values in such a way?
(如何以这种方式存储值?)
ask by George2 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…