1.this指向的问题,箭头函数没有自己的this,继承外层上下文绑定的this
2.箭头函数不绑定 arguments,取而代之用rest参数解决
var foo = (...args) => {return args[0];}3.箭头函数不能用作构造器,和new一起用会抛出报错
4.箭头函数没有原型属性
var foo = () => {};console.log(foo.prototype) //undefined
1.this指向的问题,箭头函数没有自己的this,继承外层上下文绑定的this
2.箭头函数不绑定 arguments,取而代之用rest参数解决
var foo = (...args) => {return args[0];}3.箭头函数不能用作构造器,和new一起用会抛出报错
4.箭头函数没有原型属性
var foo = () => {};console.log(foo.prototype) //undefined