This commit is contained in:
Ilya Kantor 2022-05-03 22:48:27 +04:00
parent 8eed0d781f
commit 5ef143d48e

View file

@ -109,6 +109,17 @@ Static methods are also used in database-related classes to search/save/remove e
Article.remove({id: 12345});
```
````warn header="Static methods aren't available for individual objects"
Static methods are callable on classes, not on individual objects.
E.g. such code won't work:
```js
// ...
article.createTodays(); /// Error: article.createTodays is not a function
```
````
## Static properties
[recent browser=Chrome]