一句话解释箭头函数里的This

一句话解释箭头函数里的This

一句话解释箭头函数里的This

var x ={
a: ()=>(this),
b: function(){return this}
}
// 在浏览器控制台上执行下
x.a(); // window
x.b() // this指向调用的该方法的对象x


分享到:


相關文章: