箭头函数(Arrow Functions)

ES5语法:

var getPrice = function() {
    return 4.55;
};
console.log(getPrice());

ES6 中,箭头函数就是函数的一种简写形式,使用括号包裹参数,跟随一个 =>,紧接着是函数体:

var getPrice = () => 4.55;
console.log(getPrice());
原文地址:https://www.cnblogs.com/nongzihong/p/10675509.html