ES6 learning(入门)第三记
循环对象可迭代的对象迭代的方法let list = [10, 20, 30];
let str = '你好哦';
let map = new Map();
map.set('JS', 'JavaScript');
map.set('P', 'PHP');
map.set('PY', 'Python');
for(let val of list) {
console.log(val);
}
for(let val of str) {
console.log(val);
}
for(let [key, value] of map) {
console.log(key, value);
}let item = map.value();
let temp;
while(temp = item.next()) {
if(temp.d...