Skip to content

Commit

Permalink
Update class-extends.md
Browse files Browse the repository at this point in the history
docs(class-extends): fix typo
  • Loading branch information
w-l-l committed Sep 18, 2022
1 parent 6288fc1 commit e808d04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/class-extends.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ B.foo.n // 99
A.foo.n // 99
```

上面示例中,`A.foo`的值是一个对象,浅拷贝导致`B.foo``A.foo`指向同一个对象。所以,子类`A`修改这个对象的属性值,会影响到父类`A`
上面示例中,`A.foo`的值是一个对象,浅拷贝导致`B.foo``A.foo`指向同一个对象。所以,子类`B`修改这个对象的属性值,会影响到父类`A`

## Object.getPrototypeOf()

Expand Down

0 comments on commit e808d04

Please sign in to comment.