Why am I getting the error: \"Uncaught TypeError: self.myTest is not a function\"? How do I call a method from within another method in a javascript class?
class MyClass { myTest() { console.log('it works'); } let runMyTest = ()=>{ this.myTest(); } } var myClass = new MyClass(); myClass.runMyTest();
use arrow function to bind this within a function. it works fine even on typescript