|
|
|
|
|
by rickreynoldssf
978 days ago
|
|
There are private properties in classes class Foo
{
#ImPrivate = true;
#meToo()
{
if(this.#ImPrivate)
cantTouchThis();
}
} new Foo().#meToo() === BOOM Also with using closures for "classes" takes up a whole lot more memory because new instances off all the closures are created for each instance of the class. |
|
get name() { return this.#name; }
Half of this article seems to be based on the author’s unawareness of JS class syntax.