blob: 5592bcba376920c2fce1a88541713783191ebfbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function testMoreClosures() {
var f = {}, max = 3;
var hello = function(n) {
function howdy() { return n * n }
f.test = howdy;
};
for (var i = 0; i <= max; i++)
hello(i);
return f.test();
}
assertEq(testMoreClosures(), 9);
|