I know that ,this
actually is determined by the callsite where the function actually gets called
var c={
name:"john",
func:function()
{
console.log(this.name)
}
}
c.func(); // why it returns john and why not undefined ,as the call site is window
var c = {
name: "john",
func: function() {
console.log(this.name)
}
}
c.func();
function data() {
let name = "hh";
console.log(this.name)
}
data(); // returns different