how can I access a fiel from within an anonymous function inside a method? like in this example:
class Something {
constructor (){
this.gax = “gax”;
}
doSomething(){
(function () {
console.log(this.gax);
}());
}
}
new Something().doSomething();
this will result in an error that "this" is undefined. thank you very much in advance, I could not find an answer in the web after searching for hours. best, lev