如何访问在这样的函数中定义的变量:
var functionVar = function(){
this.var = 1;
}
console.log(functionVar().var); //MH - obviously this doesn't work, but I'm looking for the command that will log that variable
如何访问在这样的函数中定义的变量:
var functionVar = function(){
this.var = 1;
}
console.log(functionVar().var); //MH - obviously this doesn't work, but I'm looking for the command that will log that variable