let sum = (num1, num2) => { return num1 + num2; };
let sum = num1 => { return num1 * 2; };
let sum = () => { console.log('hello, world'); };
//自增函数 let inc = num => num + 10; inc(12);
btn.addEventListener('click', () => { console.log(this);//window }) btn.addEventListener('click', function () { console.log(this);//具体的事件对象,如按钮 button })