michael@0: function testStringObjectLength() { michael@0: var x = new String("foo"), y = 0; michael@0: for (var i = 0; i < 10; ++i) michael@0: y = x.length; michael@0: return y; michael@0: } michael@0: assertEq(testStringObjectLength(), 3);