This commit is contained in:
Lavrentiy Rubtsov 2022-05-07 14:26:18 +06:00 committed by GitHub
parent 206485fc3a
commit 5fcdfc7d66
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.