const map = new Map();
map.set('first', 'hello');
map.set('second', 'world');
for(let [key, value] of map) {
console.log(key + value)
}
Map 结构遍历 采用for of 遍历
const map = new Map();
map.set('first', 'hello');
map.set('second', 'world');
for(let [key, value] of map) {
console.log(key + value)
}
Map 结构遍历 采用for of 遍历