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?
Other solution is save the value of variable context $this inside other for example in this
$this
this
and for use is this.anyFunction();
this.anyFunction();
class MyClass { myTest() { console.log('it works'); } runMyTest() { let this=$this; this.myTest(); } }