JS之HashMap 280862132 · 2010-03-26 13:40 · JS · Web前端 · C · C++ · Blog · C# · Markdown 感谢huangpengxiao给我的帮助(http://huangpengxiao.iteye.com/blog/96718)
put()方法有个bug, 无法覆盖已有的key-value 修改如下:
/Map的存put方法/ this.put=function(key,value){ if(!this.containsKey(key)){ size++; } entry=value; }