assigning class method to variables
It works!
JavaScript
class TestLocalFunctionOFClassMethod{
constructor(){
}
aMethod(text){
return text;
}
anotherMethod(){
let aMethodReference = this.aMethod;
return aMethodReference("Yes!");
}
}
let obj = new TestLocalFunctionOFClassMethod();
console.log(obj.anotherMethod()); // it works!