I have a problem where I'm constantly running into undefined errors (in browser), and seemingly can't figure out why / how to get around it. From what I've gathered, the keyword "this" is an utterly confusing mess in JS & inherently in TS too. Here is my problem: export class XY { property: boolean; //other properties constructor() { this.property = false; } setproperty(e) // this is an onclick event handler { this.property = true; // my problem is that this.property doesn't refer to class member variable "property" } } Even if I try something like const boundGet = XY.bind.(xy) it still is "undefined" and "unreachable". If not with the keyword "this", how am I supposed to refer to member variable property without making it const? Continue reading...