SOURCE

var name = "The Window";

  var object = {
    name : "My Object",

    getNameFunc : function(){
      var that = this;
      return function(){
        return that.name;
     };

    }

  };

  alert(object.getNameFunc()());
console 命令行工具 X clear

                    
>
console