1.箭头函数语法
var a = b => c
2.箭头函数this
通过一个例子:
var obj={
a:5,
func:()=>{
//console.log(this);
//Window
console.log(this.a);
},
test:function(){
//`
var a = b => c
通过一个例子:
var obj={
a:5,
func:()=>{
//console.log(this);
//Window
console.log(this.a);
},
test:function(){
//`