箭头函数是匿名函数.
1不能作为构造函数,不能使用new
let foo=()=>{
}
var newFoo=new foo()//foo is not a construcotr
2不能使用argumetns,取而代之用rest参数...解决
let C = (...c) => {
console.log(c);
}
C(1,2,3,3)
3不绑定this,会捕获其定义时所在的this指向作为自己的this。由于在vue中自动绑定 this 上下文到实例中,因此不能使用箭头函数来定义一个周期方法。箭头函数的this永远指向上下文的this,call、apply、bind也无法改变
4箭头函数没有原型对象