blob: e1ba1baa17b5ad0c3012c19aec680675b3c028b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
function f() {
const x = 42;
function g() {
var s = 0;
for (var i = 100; i--;)
s += x;
return s;
}
return g;
}
var func = f();
for (var i = 200; i--;)
assertEq(func(), 4200);
|