๐ฐprototype chain
Last updated
Was this helpful?
Last updated
Was this helpful?
JS โฉ value โฉ object โฉ prototype โฉ chain
the linked series of prototype objects of an object is called it's prototype chain.
ๅพไธๅๅฏ็ๅบ base class ่ derived class ็้ฃ็ต(็นผๆฟ)ๆนๅผ๏ผๅ ถๅฏฆๆฏไธไธๆจฃ็๏ผ
่บซ็บไฝฟ็จ่ ่ชๅต็็ฌฌไธๅ class๏ผbase class A ่ A.prototype ๆ้ฃๆฅ็ๅๅฅๆฏ Function.prototype ่ Object.prototypeใ
derived class B ่ B.prototype ๅๅๅฅ้ฃๆฅ A ่ A.prototypeใ