Skip to content
大纲

普通函数和箭头函数

区别

  1. this
    • 普通函数内部默认指向window,严格undefined
    • 箭头指向上一作用域this指向
  2. argunments
    • 箭头函数没有,...rest是代替功能代替,变量rest是数组;node中有
  3. 箭头不能作为构造函数
  4. 箭头函数没有原型
  5. 箭头函数不能当作generator函数

Released under the MIT License.