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:
HiddenOgre28 2021-12-15 10:15:56 -03:00 committed by GitHub
parent 8d04d0d2db
commit 6fe40fc9cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ alert( rabbit.eats ); // true (**)
alert( rabbit.jumps ); // 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): 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):