Skip to content

Commit ab55453

Browse files
authored
Update article.md
Grammar suggestions
1 parent 33cca1b commit ab55453

File tree

1 file changed

+3
-3
lines changed
  • 1-js/09-classes/03-static-properties-methods

1 file changed

+3
-3
lines changed

‎1-js/09-classes/03-static-properties-methods/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ rabbits.sort(Rabbit.compare);
169169
rabbits[0].run(); // Black Rabbit runs with speed 5.
170170
```
171171

172-
Now when we can call `Rabbit.compare`, the inherited `Animal.compare` will be called.
172+
Now when we call `Rabbit.compare`, the inherited `Animal.compare` will be called.
173173

174174
How does it work? Again, using prototypes. As you might have already guessed, `extends` gives `Rabbit` the `[[Prototype]]` reference to `Animal`.
175175

@@ -180,7 +180,7 @@ So, `Rabbit extends Animal` creates two `[[Prototype]]` references:
180180
1. `Rabbit` function prototypally inherits from `Animal` function.
181181
2. `Rabbit.prototype` prototypally inherits from `Animal.prototype`.
182182

183-
As the result, inheritance works both for regular and static methods.
183+
As a result, inheritance works both for regular and static methods.
184184

185185
Here, let's check that by code:
186186

@@ -197,7 +197,7 @@ alert(Rabbit.prototype.__proto__ === Animal.prototype); // true
197197

198198
## Summary
199199

200-
Static methods are used for the functionality that belongs to the class "as a whole", doesn't relate to a concrete class instance.
200+
Static methods are used for the functionality that belongs to the class "as a whole". It doesn't relate to a concrete class instance.
201201

202202
For example, a method for comparison `Article.compare(article1, article2)` or a factory method `Article.createTodays()`.
203203

0 commit comments

Comments
 (0)