michael@0: actual = ''; michael@0: expected = '0,1,2,3,4,'; michael@0: michael@0: function g(a) { michael@0: a(); michael@0: } michael@0: michael@0: function f(y) { michael@0: var q; michael@0: q = function() { appendToActual(y); }; michael@0: g(q); michael@0: } michael@0: michael@0: for (var i = 0; i < 5; ++i) { michael@0: f(i); michael@0: } michael@0: michael@0: michael@0: assertEq(actual, expected)