1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
"use strict"; var t = [4]; var stop; Object.freeze(t); do { let ok = false; stop = inIon(); try { t[1] = 2; } catch(e) { ok = true; } assertEq(ok, true); assertEq(t.length, 1); assertEq(t[1], undefined); } while (!stop);