I can store a function in a variable and call it later like this
var storedFunction = functionName;
//Later On
storedFunction(); //Equivalent to functionName()
How can I store a function like this and call it later, also executing this
when its called so this
would be the
var storedFunction = this.function1().function2();
Later I could call it like this and this
would be the class.
class MyClass {
method() {
storedFunction();
}
}