description of the problem: in the following code, var is called globally. The this points to window, and the name variable is not defined under window. Why does the global call c () output 1 instead of undefined
?var a={
name:2,
b:function(){
this.namePP
console.log(this.name)
}
}
a.b()//3
var c=a.b
c()//1