minor fixes

This commit is contained in:
Ilya Kantor 2020-07-02 14:24:52 +03:00
parent ea3d179622
commit 94c8fcb248

View file

@ -230,7 +230,9 @@ let rabbit = new Rabbit("White Rabbit", 10); // Error: this is not defined.
Whoops! We've got an error. Now we can't create rabbits. What went wrong? Whoops! We've got an error. Now we can't create rabbits. What went wrong?
The short answer is: constructors in inheriting classes must call `super(...)`, and (!) do it before using `this`. The short answer is:
- **Constructors in inheriting classes must call `super(...)`, and (!) do it before using `this`.**
...But why? What's going on here? Indeed, the requirement seems strange. ...But why? What's going on here? Indeed, the requirement seems strange.