直接看這篇
this 代表的是 function 執行時所屬的物件,而不是 function 本身。
每個執行環境都有屬於自己的this關鍵字(自然產生)
this與函式如何宣告沒有關聯性,僅與呼叫方法有關
嚴格模式下,簡易呼叫會有很大的改變
截圖 2024-06-07 下午4.27.08
百分之95的this指向都是以上(如果前面有物件就指向物件,沒有就指向全域
Are you sure to leave this team?
Once you delete your team, all team notes will be deleted and cannot be recovered. Please ensure you've exported or transfered these notes.
Enter team name before deleting it:
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up