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
  • 7,773
  • 3
  • 40
  • 53
Alessandro
  • 633
  • 1
  • 7
  • 19

0 Answers0