🔸static member
🚧 under construction
JS ⟩ value ⟩ object ⟩ class ⟩ member ⟩ static
⭐️ static members
class A {
static a; // A.a = undefined
static b = 0; // A.b (static property: initialized)
static get c() { ... } // A.c (static getter)
static d() { ... } // A.d() (static method)
}
⭐️ private static members
accessable only within the class body.
private members are not inherited.
class A {
// ⭐️ "#" means "private"
static #e; // A.#e (private static property: uninitialized)
static get #f() { ... } // A.#f (private static getter)
static #g() { ... } // A.#g() (private static method)
}
Last updated
Was this helpful?