mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-25 03:02:21 +00:00
docs(module-extends): edit extends
This commit is contained in:
parent
b4f1226178
commit
3c7e8a6365
@ -389,7 +389,7 @@ class B {
|
|||||||
// B 的实例继承 A 的实例
|
// B 的实例继承 A 的实例
|
||||||
Object.setPrototypeOf(B.prototype, A.prototype);
|
Object.setPrototypeOf(B.prototype, A.prototype);
|
||||||
|
|
||||||
// B 的实例继承 A 的静态属性
|
// B 继承 A 的静态属性
|
||||||
Object.setPrototypeOf(B, A);
|
Object.setPrototypeOf(B, A);
|
||||||
|
|
||||||
const b = new B();
|
const b = new B();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user