Update article.md

This commit is contained in:
Avinash Singh 2019-03-22 09:17:36 +05:30 committed by GitHub
parent 37f50d8c53
commit 591b5f79f9
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 {