“this” Keyword in JavaScript

Like C# in JavaScript “this” represents current instance and an instance can be accessed in any class method by using “this” keyword. For example “a onlcick=”check(this)” in this line “this” represents the object a on which check function is going to call on click event. You will understand the advantage of “this” keyword in this page and I request you to please stop yourself here only if you have any doubt in this page.

 

Leave a Reply

Your email address will not be published. Required fields are marked *