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);
本文共 277 字,大约阅读时间需要 1 分钟。
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);
转载于:https://blog.51cto.com/jormin/1324018