What will be the output of the following javascript code snippet | this concept in arrow function

preview_player
Показать описание
#short #shortfeed #javascript
Рекомендации по теме
Комментарии
Автор

hint : here we have two function .
first one is normal function and other is arrow function.

for normal function, the this value will be scope object.
but for arrow function, it refer parent function .
so 'this' value will be P.

but, we are calling the function with call keyword, so it will update the this value associated with obj1.

so, output will be "V".

Coding-Edu
Автор

I think, output will be {name: "V"}

kapilgupta
visit shbcf.ru