1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function outOfBounds() { var proto = ["pass"]; var N = 100; for (var i = 0; i <= N; ++i) { if (i === N) { Object.setPrototypeOf(arguments, proto); } var arg = arguments[0]; assertEq(arg, i !== N ? undefined : "pass"); } } outOfBounds();