minor fixes
This commit is contained in:
parent
ea3d179622
commit
94c8fcb248
1 changed files with 3 additions and 1 deletions
|
@ -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?
|
||||
|
||||
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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue