SOURCE

var Foo = function() {
  var name = 'zhus';
  this.getName = function() {
    return name;
  }
	this.setName = function (name2){
			name = name2;
		}
}
var foo = new Foo();
foo.setName('hah');
console.log(foo.getName());
var foo2=new Foo();
console.log(foo2.getName());
console.dir(foo);
console.dir(foo2);
console 命令行工具 X clear

                    
>
console