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