let obj = { a: 1 }function fn(){ console.log( this ) console.log( this.a )}let newFn = fn.bind( obj )newFn()
上述中的 this 会打印出什么呢?
this
newFn() === fn.bind( obj )() ==> this === obj ==> this.a === 1