Skip to content

Commit 2d80f86

Browse files
authored
Merge pull request #2770 from itaileshem/master
Fix grammar
2 parents 747fc37 + e4c5707 commit 2d80f86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ There's no own constructor in `Rabbit`, so `Animal` constructor is called.
323323

324324
What's interesting is that in both cases: `new Animal()` and `new Rabbit()`, the `alert` in the line `(*)` shows `animal`.
325325

326-
**In other words, parent constructor always uses its own field value, not the overridden one.**
326+
**In other words, the parent constructor always uses its own field value, not the overridden one.**
327327

328328
What's odd about it?
329329

@@ -360,9 +360,9 @@ And that's what we naturally expect. When the parent constructor is called in th
360360

361361
...But for class fields it's not so. As said, the parent constructor always uses the parent field.
362362

363-
Why is there the difference?
363+
Why is there a difference?
364364

365-
Well, the reason is in the field initialization order. The class field is initialized:
365+
Well, the reason is the field initialization order. The class field is initialized:
366366
- Before constructor for the base class (that doesn't extend anything),
367367
- Immediately after `super()` for the derived class.
368368

0 commit comments

Comments
 (0)