From 09f01b59fc2c91492608c89c8c17f67ff368a75a Mon Sep 17 00:00:00 2001 From: ColdMoonMao <364562354@qq.com> Date: Fri, 25 Aug 2017 11:53:24 +0800 Subject: [PATCH] Update class-extends.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 应该是子类原型对象是父类原型对象的实例吧! --- docs/class-extends.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/class-extends.md b/docs/class-extends.md index 152b2fb..02b36ee 100644 --- a/docs/class-extends.md +++ b/docs/class-extends.md @@ -399,7 +399,7 @@ Object.setPrototypeOf(B, A); B.__proto__ = A; ``` -这两条继承链,可以这样理解:作为一个对象,子类(`B`)的原型(`__proto__`属性)是父类(`A`);作为一个构造函数,子类(`B`)的原型(`prototype`属性)是父类的实例。 +这两条继承链,可以这样理解:作为一个对象,子类(`B`)的原型(`__proto__`属性)是父类(`A`);作为一个构造函数,子类(`B`)的原型对象(`prototype`属性)是父类的原型对象(`prototype`属性)的实例。 ```javascript Object.create(A.prototype);