JavaScript this Keyword

JavaScript this Keyword


JavaScript this keyword
In this tutorial, you will learn about JavaScript this keyword with the help of Examples: Sometimes a method will need to refer to the object that invoked it so you will need to use this keyword. A function’s this keyword behaves a little differently in JavaScript compared to other languages .
Example1 -
Output - 
Yellow
Sweet
10
Example 2 -
Output -
Web Designing House Noida UP