Program 14 this keyword | JavaScript this contexts | window object | current object context

preview_player
Показать описание

In the second call, the foo() function is invoked on the obj object. The this keyword inside the foo() function now refers to the obj object, so the output will be the obj object.

Output:-
Window // output of the first call to foo()
------------------------
Рекомендации по теме
visit shbcf.ru