mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
21 lines
297 B
JavaScript
21 lines
297 B
JavaScript
class Cl {
|
|
#privateField = 0;
|
|
counter = 0;
|
|
|
|
get #privateFieldValue() {
|
|
return this.#privateField;
|
|
}
|
|
|
|
get self() {
|
|
this.counter++;
|
|
return this;
|
|
}
|
|
|
|
constructor() {
|
|
this.self.#privateFieldValue = 1
|
|
([this.self.#privateFieldValue] = [1]);
|
|
}
|
|
}
|
|
|
|
const cl = new Cl();
|