x => x*x;
function(x){
return x*x;
}
(x,y) => x*y;
function(x,y){
return x*y;
}
() =>{ console.log(
"no_param_function") };
function(){
console.log(
"no_param_function");
}
(x,y) =>{ console.log(x+y) };
function(x,y){
console.log(x+y);
}
箭头函数绑定父上下文,所以this指向同function(){}不同
转载请注明原文地址: https://ju.6miu.com/read-673256.html