to both -> both to
In the original it's read as if there is two rabbit methods, instead of "both to... and also to..."
This commit is contained in:
parent
b462bdd1d3
commit
21a751ab0e
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ rabbit.run(5); // White Rabbit runs with speed 5.
|
|||
rabbit.hide(); // White Rabbit hides!
|
||||
```
|
||||
|
||||
Object of `Rabbit` class have access to both `Rabbit` methods, such as `rabbit.hide()`, and also to `Animal` methods, such as `rabbit.run()`.
|
||||
Object of `Rabbit` class have access both to `Rabbit` methods, such as `rabbit.hide()`, and also to `Animal` methods, such as `rabbit.run()`.
|
||||
|
||||
Internally, `extends` keyword works using the good old prototype mechanics. It sets `Rabbit.prototype.[[Prototype]]` to `Animal.prototype`. So, if a method is not found in `Rabbit.prototype`, JavaScript takes it from `Animal.prototype`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue