#this-keyword
Read more stories on Hashnode
Articles with this tag
this 的指向取決於函式的調用方式,而非函式的定義方式。 · 1. 在方法 (method) 中 當 this 出現在物件的方法內部時,它指向的是調用該方法的物件。 const obj = { name: "Coffee", greet() { ...