var arr = [1, 2, 3, 4, 5]; (function () { for (var i = 0; i < arr.length; i++) { console.log(i) } })() var name = 'window' var p = { name: 'Perter', getName: function () { return function () { return this.name } } } var getName = p.getName() // 立即执行 var _name = getName.call(p) console.log(getName) console.log(_name)