michael@0: function MyConstructor(i) michael@0: { michael@0: this.i = i; michael@0: } michael@0: MyConstructor.prototype.toString = function() {return this.i + ""}; michael@0: michael@0: function newTest() michael@0: { michael@0: var a = []; michael@0: for (var i = 0; i < 10; i++) michael@0: a[i] = new MyConstructor(i); michael@0: return a.join(""); michael@0: } michael@0: assertEq(newTest(), "0123456789");