javascript实现Map


var map = {}; // Map map = new HashMap();
map[key] = value; // map.put(key, value);
var value = map[key]; // Object value = map.get(key);
var has = key in map; // boolean has = map.containsKey(key);
delete map[key]; // map.remove(key);

你可能感兴趣的:(jQuery实现Map,js的键值对实现,js实现Map)