var name = "this is window" var o = { name:"this is o", getName:function(){ return function(){ console.log(this.name) } } } o.getName()