SOURCE

var array = [1, 2, 3];
//传统写法
array.forEach(function(v, i, a) {
    //console.log(v);
});
//ES6
array.forEach((v,i,b) => console.log(v,i,b));

var items = [
  ['name', '张三'],
  ['title', 'Author']
];
var map = new Map();
items.forEach(([key, value]) => map.set(key, value));
console.log(map);

//产生一个随机数
var num=Math.random();
//将这个数字输出到console
console.log(`your num is ${num}`);
console 命令行工具 X clear

                    
>
console