What is this Keyword in Javascript ?

The this keyword refers to the object it belongs to. In an object method, this refers to the object to which method belongs. When used alone, the owner is the Global object, so this refers to the Global object (Windows object). In a function, this refers to the Global object (Windows object). In strict mode, when used in a function, this is undefined. In HTML event handlers, this refers to the element in html that received the event.



You May Interest

JavaScript How To Find The Average Of 10 Numbers Using A While Lo ...

What is Difference Between Call and Apply Methods in Javascript ?

What is go Method of History Object in Javascript ?

What are Control Flow Statements in Javascript ?

JavaScript Concatenating Arrays