this inside function
The this keyword refers to the object the function belongs to, or the window object if the function belongs to no object. It’s used in OOP code, to refer to the class/object the function belongs to For example: function foo() { this.value=”Hello, world”; this.bar = function() { alert(this.value); } } var inst = new foo(); … Read more