📜  更新地图值 javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:17.054000             🧑  作者: Mango

代码示例1
var myMap = {};

myMap[newKey] = newValue;

// ...


// Another method

var myMap = new Map()
myMap.set("key0","value")
// ...
myMap.has("key1"); // evaluates to false, assuming key1 wasn't set