docs(object): edit Object.value()

This commit is contained in:
ruanyf
2016-12-13 19:22:09 +08:00
parent e9fbf72aac
commit 7f0b3fe2f0
4 changed files with 16 additions and 13 deletions
+3 -1
View File
@@ -624,9 +624,11 @@ class B {
// B的实例继承A的实例
Object.setPrototypeOf(B.prototype, A.prototype);
const b = new B();
// B继承A的静态属性
// B的实例继承A的静态属性
Object.setPrototypeOf(B, A);
const b = new B();
```
《对象的扩展》一章给出过`Object.setPrototypeOf`方法的实现。