~eda-qa/leaflang/cleanup_factorial

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<script>
function foo(x) {
  return function () {
    alert(++x);
  }
}

var b1 = foo(10);
var b2 = foo(10);

b1();
b1();
b1();
b2();

</script>