ES6箭头函数 ES5写法 function add(a,b){ return a+b } console.log(add(1,2)); // 3 转换成ES6箭头函数写法 let add=(a,b)=>{ return a+b } console.log(add(1,2)); //3