Skip to content

Commit 5ef143d

Browse files
committed
closes #2982
1 parent 8eed0d7 commit 5ef143d

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

+11
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ Static methods are also used in database-related classes to search/save/remove e
109109
Article.remove({id: 12345});
110110
```
111111

112+
````warn header="Static methods aren't available for individual objects"
113+
Static methods are callable on classes, not on individual objects.
114+
115+
E.g. such code won't work:
116+
117+
```js
118+
// ...
119+
article.createTodays(); /// Error: article.createTodays is not a function
120+
```
121+
````
122+
112123
## Static properties
113124

114125
[recent browser=Chrome]

0 commit comments

Comments
 (0)