call a method from another method in javascript code example
Example: invoke method from another method in same object
class MyClass {
myTest() {
console.log('it works');
}
runMyTest() {
this.myTest();
}
}
var myClass = new MyClass();
myClass.runMyTest();