Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / jit-test / tests / closures / t029.js
1 actual = '';
2 expected = '101,';
3
4 function looper(f) {
5   for (var i = 0; i < 10; ++i) {
6     for (var j = 0; j < 10; ++j) {
7       f();
8     }
9   }
10 }
11
12 function tester() {
13   var x = 1;
14   looper(function() { ++x; });
15   return x;
16 }
17
18 appendToActual(tester());
19
20
21 assertEq(actual, expected)