Skip to content

Commit 26bf51a

Browse files
committed
minor fixes
1 parent 94c8fcb commit 26bf51a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/09-classes/02-class-inheritance/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ That label affects its behavior with `new`.
245245
- When a regular function is executed with `new`, it creates an empty object and assigns it to `this`.
246246
- But when a derived constructor runs, it doesn't do this. It expects the parent constructor to do this job.
247247

248-
So a derived constructor must call `super` in order to execute its parent (non-derived) constructor, otherwise the object for `this` won't be created. And we'll get an error.
248+
So a derived constructor must call `super` in order to execute its parent (base) constructor, otherwise the object for `this` won't be created. And we'll get an error.
249249

250250
For the `Rabbit` constructor to work, it needs to call `super()` before using `this`, like here:
251251

0 commit comments

Comments
 (0)