From 5ef143d48e748ddfb8206e65746e87980b91a843 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Tue, 3 May 2022 22:48:27 +0400 Subject: [PATCH] closes #2982 --- .../03-static-properties-methods/article.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/1-js/09-classes/03-static-properties-methods/article.md b/1-js/09-classes/03-static-properties-methods/article.md index 60b9824d..4b493a5e 100644 --- a/1-js/09-classes/03-static-properties-methods/article.md +++ b/1-js/09-classes/03-static-properties-methods/article.md @@ -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]