Here why this pointing to global object(window).
I know that using arrow function or closure or call/apply/bind, I can make it point to person object.
But I am not at all clear that why this pointing to global object(window).
var person={
name:'xyz',
printName: function() {
function displayName() {
console.log(this);
}
displayName();
}
}
person.printName();