class.js (420B)
1 class Test { 2 publicProperty; 3 #privateProperty = "default"; 4 static myStatic = "static"; 5 static hello() { 6 return "Hello " + this.myStatic 7 } 8 static { 9 const x = this.myStatic; 10 } 11 12 constructor() { 13 this.publicProperty = "foo"; 14 this.#privateProperty = "bar"; 15 } 16 17 bar(a) { 18 console.log("bar", a); 19 } 20 21 baz = b => { 22 return b * 2; 23 }; 24 } 25 26 class Test2 {} 27 28 let expressiveClass = class {};