1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Merge pull request #1137 from w-l-l/patch-1

docs(class-extends): fix typo
This commit is contained in:
Ruan YiFeng 2022-09-18 20:18:44 +08:00 committed by GitHub
commit cded3bc144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,7 +220,7 @@ B.foo.n // 99
A.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() ## Object.getPrototypeOf()