Update article.md
3 commas and a period.
This commit is contained in:
parent
01bb68474c
commit
c07eb5c29a
1 changed files with 1 additions and 1 deletions
|
@ -246,7 +246,7 @@ The resulting picture:
|
|||
|
||||

|
||||
|
||||
If we had other objects like `bird`, `snake` etc inheriting from `animal`, they would also gain access to methods of `animal`. But `this` in each method call would be the corresponding object, evaluated at the call-time (before dot), not `animal`. So when we write data into `this`, it is stored into these objects.
|
||||
If we had other objects, like `bird`, `snake`, etc., inheriting from `animal`, they would also gain access to methods of `animal`. But `this` in each method call would be the corresponding object, evaluated at the call-time (before dot), not `animal`. So when we write data into `this`, it is stored into these objects.
|
||||
|
||||
As a result, methods are shared, but the object state is not.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue