michael@0: Array.prototype.__defineSetter__(32, function() { print("Hello from arbitrary JS");}); michael@0: var UBound = 0; michael@0: var expect= ''; michael@0: var expectedvalues = []; michael@0: for (var j=0; j < 10; j++) { michael@0: addThis(); michael@0: addThis(); michael@0: addThis(); michael@0: addThis(); michael@0: } michael@0: function addThis() { michael@0: expectedvalues[UBound] = expect; michael@0: UBound++; michael@0: }