Changed a word in article.md
Change the phrase "a property" to "the property" in line 57 (`Here the line (*) sets animal to be a prototype of rabbit.`) because it made it sound like an object can inherit more than one prototype at a time.
This commit is contained in:
parent
8d04d0d2db
commit
6fe40fc9cd
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ alert( rabbit.eats ); // true (**)
|
|||
alert( rabbit.jumps ); // true
|
||||
```
|
||||
|
||||
Here the line `(*)` sets `animal` to be a prototype of `rabbit`.
|
||||
Here the line `(*)` sets `animal` to be the prototype of `rabbit`.
|
||||
|
||||
Then, when `alert` tries to read property `rabbit.eats` `(**)`, it's not in `rabbit`, so JavaScript follows the `[[Prototype]]` reference and finds it in `animal` (look from the bottom up):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue