mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages
This commit is contained in:
commit
ded5622c5d
@ -730,7 +730,7 @@ Object.getPrototypeOf(ColorPoint) === Point
|
||||
|
||||
(1)作为函数调用时(即`super(...args)`),`super`代表父类的构造函数。
|
||||
|
||||
(2)作为对象调用时(即`super.prop`或`super.method()`),`super`代表父类。注意,此时`super`即可以引用父类实例的属性和方法,也可以引用父类的静态方法。
|
||||
(2)作为对象调用时(即`super.prop`或`super.method()`),`super`代表父类。注意,此时`super`既可以引用父类实例的属性和方法,也可以引用父类的静态方法。
|
||||
|
||||
```javascript
|
||||
class B extends A {
|
||||
|
Loading…
x
Reference in New Issue
Block a user