es6 箭头函数
1 :x=>x*x
function (x){
return x*x
}
2: x=>{
if(x>0){
return 1;
}else{
return 0;
}
}
function (x){
if(x>0){
return 1;
}else{
return 0;
}
}
3: (x,y)=>x+y
function (x,y){
return x+y;
}
4: x=>({name:'lili'})
function (x){
return {name:'lili'}
}