arrow function
1.0、参考
1.1、各个环境对该功能的支持程度
1.2、解释

arrow的汉语意思是箭头function的汉语意思是函数

arrow function的意思是箭头函数

arrow functionECMAScriptLamda表达式的实现。

1.3、语法
(param1, param2, …, paramN) => { statements }

(param1, param2, …, paramN) => expression
// equivalent to: => { return expression; }

// Parentheses are optional when there's only one parameter name:
(singleParam) => { statements }
singleParam => { statements }

// The parameter list for a function with no parameters should be written with a pair of parentheses.
() => { statements }
1.3、示例1
function sum(...theArgs) {
    return theArgs.reduce((previous, current) => previous + current);
}

console.log(sum(1, 2, 3));  // expected output: 6