michael@0: actual = ''; michael@0: expected = '2,'; michael@0: michael@0: function k(f_arg) { michael@0: for (var i = 0; i < 100; ++i) { michael@0: f_arg(); michael@0: } michael@0: } michael@0: michael@0: function t() { michael@0: var x = 1; michael@0: k(function () { x = 2; }); michael@0: appendToActual(x); michael@0: } michael@0: michael@0: t(); michael@0: michael@0: michael@0: assertEq(actual, expected)