1 2 3 4 5 6 7 8 9 10 11 12 13 14
function bar() { foo.arguments.length = 10; } function foo(x) { var a = arguments; var n = 0; bar(); assertEq(x, 5); assertEq(a.length, 1); } foo(5);