Merge pull request #1447 from paroche/patch-53

Update article.md
This commit is contained in:
Ilya Kantor 2019-10-13 14:21:51 +03:00 committed by GitHub
commit 4be5963be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,7 +211,7 @@ The answer is simple: `this` is not affected by prototypes at all.
So, the setter call `admin.fullName=` uses `admin` as `this`, not `user`. So, the setter call `admin.fullName=` uses `admin` as `this`, not `user`.
That is actually a super-important thing, because we may have a big object with many methods and inherit from it. Then inherited objects can run its methods, and they will modify the state of these objects, not the big one. That is actually a super-important thing, because we may have a big object with many methods, and have objects that inherit from it. And when the inheriting objects run the inherited methods, they will modify only their own states, not the state of the big object.
For instance, here `animal` represents a "method storage", and `rabbit` makes use of it. For instance, here `animal` represents a "method storage", and `rabbit` makes use of it.