Skip to content

Commit b865e2f

Browse files
authored
Merge pull request #1633 from Rnbsov/patch-82
2 parents ade428f + b8d6c4f commit b865e2f

File tree

1 file changed

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

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ alert( article.title ); // Сегодняшний дайджест
109109
Article.remove({id: 12345});
110110
```
111111

112+
````warn header="Статические методы недоступны для отдельных объектов"
113+
Статические методы могут вызываться для классов, но не для отдельных объектов.
114+
115+
Например. такой код не будет работать:
116+
117+
```js
118+
// ...
119+
article.createTodays(); /// Error: article.createTodays is not a function
120+
```
121+
````
122+
112123
## Статические свойства
113124

114125
[recent browser=Chrome]

0 commit comments

Comments
 (0)