summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug595963-1.js
blob: 2cccfac400d10f042dc5f6aa8f228770177c867a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function remove(k, L) {
  for (var i in k) {
    if (i == L)
      k.splice(L, 1);
  }
}
function f(k) {
  var L = 0;
  for (var i in k) {
    if (L == 1)
      remove(k, L);
    L++;
    assertEq(k[i], 3);
  }
  assertEq(L, 6);
}

var a = [3, 3, 3, 3, 3, 3, 3];
f(a);