JavaScript - this 是誰、指向哪裡,以及 call、apply、bind
this 是什麼
this 是 JavaScript 的一個關鍵字
this 是 function 執行時,自動生成的一個內部物件
隨著 function 執行場合的不同,this 所指向的值,也會有所不同
this 與 function 在何處被宣告完全無關,而是取決於 function 被呼叫的方式
在大多數的情況下, this 代表的就是呼叫 function 的物件 (owner Object of the function)
當 function 是某個 object 的 ...
yachuh.hashnode.dev3 min read