老男孩linux81期
2022-11-28 21:51 作者:邱邱邱2585093180 | 我要投稿
let obj = { a: 1 }function fn(){??console.log( this )??console.log( this.a )}let newFn = fn.bind( obj )newFn() 上述中的 this 會打印出什么呢? newFn() === fn.bind( obj )() ==> this === obj ==> this.a === 1
標(biāo)簽: