0

I would like to call a method inside a class with a given string, here's an example:

 class A {
    mymethod(){
      console.log("hey");
    }

    anotherMethod(fName){
      return this.fName();
    }
  }

Is this possible in node.js?

Zeeshan Hassan Memon
  • 8,105
  • 4
  • 43
  • 57
Alessandro
  • 643
  • 1
  • 7
  • 20

0 Answers0