How to access global variable from an asynchronous function? I get that global variable is not defined although it is.
what do you mean by that?
I have global variable myVariable
;
In constructor I say this.myVariable = "someValue";
and then in an asynchronous method: console.log(this.myVariable);
and get undefined.
Is that what you mean?