1class Hi {
2 constructor() {
3 console.log("hi");
4 }
5 my_method(){}
6 static my_static_method() {}
7}
8
9function getMethods(cl) {
10 return Object.getOwnPropertyNames(cl.prototype)
11}
12
13console.log(getMethods(Hi)) // => [ 'constructor', 'my_method' ]
14