一句話解釋箭頭函數裡的This

一句話解釋箭頭函數里的This

一句話解釋箭頭函數里的This

var x ={
a: ()=>(this),
b: function(){return this}
}
// 在瀏覽器控制檯上執行下
x.a(); // window
x.b() // this指向調用的該方法的對象x


分享到:


相關文章: