(function(){
var t = 0;
var _this;
function Adder(x){
_this = this;
_this.v = x;
t = t + (+x);
}
Adder.prototype.test = function (){
alert(t)
};
Adder.prototype.test2 = function (){
alert(_this.v);
};
window.Adder = Adder;
})();
var a1= new Adder(5);
a1.test();//output:5
var a2 = new Adder(1);
a2.test();//output:6
a1.test2();//output:1