箭头函数和普通函数的区别


  • 语法更简洁
  • 不能作为构造函数
    • 没有自己的 this:继承自上一层作用域
    • 没有 prototype 属性
  • 没有 arguments 对象:继承自上一层作用域