Day 21:箭頭函數 (Arrow Functions) 的 this 和你想的不一樣 (1)
Arrow Functions 的 this 判斷原則
this 判斷原則1. 物件函式
1.1. 函數被定義在物件之內
傳統函數
Arrow Functions
1.2. 借用函數 (函數被定義在物件之外)
傳統函數
Arrow Functions
1.3. 物件的屬性物件的函式
傳統函數
Arrow Functions
2. 簡易呼叫 (Simple Call)
2.1. 全域環境 (Global Context) 下定義函數 & 呼叫函數
傳統函數
Arrow Functions
2.2. 內部函數 (Inner Functions)
傳統函數
Arrow Functions I
Arrow Functions II
Arrow Functions III
References
Last updated
Was this helpful?