0

I understand the context of this in a function is decided by the call site or call stack . In below example , even though the call to bar() is made from foo(), Why 'this' inside bar() is not pointing to foo()?

function bar(){
  console.log(this);
 }

function foo()
{
 bar();
}

foo();
user2991413
  • 331
  • 7
  • 22

0 Answers0