I started using Base.js for a class inheritance. In Base.js a class should be an object, but does not function.
This creates a problem:
var obj = {
variable:true,
func:function(){
console.log(variable);
}
};
obj.func();
This code throw error: "Uncaught ReferenceError: variable is not defined". This is because "console.log(variable);" does not have "this".
But i dont want write "this" in ALL functions in my large class.
Is there any way around this?