📜  js 地图大小 - Javascript 代码示例

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

代码示例1
const map1 = new Map();

map1.set('a', 'alpha');
map1.set('b', 'beta');
map1.set('g', 'gamma');

console.log(map1.size);
// expected output: 3