this.obj = [];
function gObject() {
this.obj = [];
this.noofloop = 100000;
this.do = function () {
var o = [];
for (var i=0;i<this.noofloop;i+=1) {
o.push(i);
}
return o;
};
this.doLoopObject = function (amount) {
this.obj.push(amount);
};
this.getarray=function(){
return this.obj;
}
};
var g = new gObject();
g.doLoopObject(10);
g.doLoopObject(11);
var obj=g.getarray();
document.write(obj.toString());
</script>
No comments:
Post a Comment