1.函数的声明方式
function fn1() {} var fn2 = () => {} var fn3 = new Function()
2.函数的上下文(即:this)
非严格模式下:
function 和 new Function 声明得到的函数,this的指向均为调用对象,默认为window
严格模式下:
function 和 new Function 声明得到的函数,this的指向为undefined
使用 lambda 声明的函数则只与定义的上下文有关
var fn = new Function('console.log(this)') // 等价于function声明 function fn() {console.log(this);} fn()
var fn = new Function(' "use strict&