1. 我的理解
原型鏈?zhǔn)且环N鏈?zhǔn)嚼^承 芬骄,體現(xiàn)在 __proto__
原型對象是一個(gè)對象 峦嗤,即 prototype
//原型鏈繼承 可以看成__proto__繼承自 parent prototype, 直至Object.__proto__==null
instance.__proto__ = class/function .prototype
class/function.prototype.constructor = instance.__proto__.constructor = class/function
Function.prototype = {
constuctor: Function
__proto__: parent prototype
}
2. 看張圖吧
image
參考
http://www.reibang.com/p/aa1ebfdad661/
https://www.cnblogs.com/shuiyi/p/5305435.html