Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get all methods of class

class Foo {
  public doSomething(){
    return 5;
  }
}

let foo = new Foo();
let propertyNames = Object.getOwnPropertyNames(Object.getPrototypeOf(foo));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #methods #class
ADD COMMENT
Topic
Name
9+2 =