Merge pull request #867 from avinashsinghdhillon/patch-1

Update article.md
This commit is contained in:
Ilya Kantor 2019-04-02 08:39:33 +03:00 committed by GitHub
commit 69c7491250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
# Static properties and methods
We can also assign a methods to the class function, not to its `"prototype"`. Such methods are called *static*.
We can also assign a method to the class function, not to its `"prototype"`. Such methods are called *static*.
An example:
@ -125,9 +125,9 @@ Article.publisher = "Ilya Kantor";
## Statics and inheritance
Statics are inhereted, we can access `Parent.method` as `Child.method`.
Statics are inherited, we can access `Parent.method` as `Child.method`.
For instance, `Animal.compare` in the code below is inhereted and accessible as `Rabbit.compare`:
For instance, `Animal.compare` in the code below is inherited and accessible as `Rabbit.compare`:
```js run
class Animal {