Skip to content

Commit 09f01b5

Browse files
authored
Update class-extends.md
应该是子类原型对象是父类原型对象的实例吧!
1 parent 66e421f commit 09f01b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/class-extends.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ Object.setPrototypeOf(B, A);
399399
B.__proto__ = A;
400400
```
401401

402-
这两条继承链,可以这样理解:作为一个对象,子类(`B`)的原型(`__proto__`属性)是父类(`A`);作为一个构造函数,子类(`B`的原型`prototype`属性)是父类的实例
402+
这两条继承链,可以这样理解:作为一个对象,子类(`B`)的原型(`__proto__`属性)是父类(`A`);作为一个构造函数,子类(`B`的原型对象`prototype`属性)是父类的原型对象(`prototype`属性)的实例
403403

404404
```javascript
405405
Object.create(A.prototype);

0 commit comments

Comments
 (0)