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

fix: typing error

This commit is contained in:
Amy 2019-07-11 16:25:49 +08:00 committed by GitHub
parent 40256f2f5c
commit ae011d17ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ class B extends A {
} }
``` ```
上面代码中,`super()`用在`B`类的`m`方法之中,就会造成法错误。 上面代码中,`super()`用在`B`类的`m`方法之中,就会造成法错误。
第二种情况,`super`作为对象时,在普通方法中,指向父类的原型对象;在静态方法中,指向父类。 第二种情况,`super`作为对象时,在普通方法中,指向父类的原型对象;在静态方法中,指向父类。