Merge pull request #2993 from Rnbsov/patch-42

smth
This commit is contained in:
Ilya Kantor 2022-05-12 07:31:41 +04:00 committed by GitHub
commit 9aee5fc1af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ class Rabbit extends Animal {
}
```
Usually we don't want to totally replace a parent method, but rather to build on top of it to tweak or extend its functionality. We do something in our method, but call the parent method before/after it or in the process.
Usually, however, we don't want to totally replace a parent method, but rather to build on top of it to tweak or extend its functionality. We do something in our method, but call the parent method before/after it or in the process.
Classes provide `"super"` keyword for that.