From 0ccb9cde16fc3f4d9d35815c0836f385c14f062c Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 11 Feb 2025 10:41:16 +0200 Subject: [PATCH] Update article summary.md In static method declarations "this" points to the class constructor (added to summary) --- 1-js/09-classes/03-static-properties-methods/article.md | 2 ++ 1 file changed, 2 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 4b493a5e8b..6c7bf140bc 100644 --- a/1-js/09-classes/03-static-properties-methods/article.md +++ b/1-js/09-classes/03-static-properties-methods/article.md @@ -223,6 +223,8 @@ For example, a method for comparison `Article.compare(article1, article2)` or a They are labeled by the word `static` in class declaration. +"this" in a static method declaration points to the class constructor itself, not to an instance object of the class as in regular method declarations. + Static properties are used when we'd like to store class-level data, also not bound to an instance. The syntax is: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy