1class Something {
2 #property;
3
4 constructor(){
5 this.#property = "test";
6 }
7
8 #privateMethod() {
9 return 'hello world';
10 }
11
12 getPrivateMessage() {
13 return this.#privateMethod();
14 }
15}
16
17const instance = new Something();
18console.log(instance.property); //=> undefined
19console.log(instance.privateMethod); //=> undefined
20console.log(instance.getPrivateMessage()); //=> hello worl