summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/ifInsideLoop.js
blob: 296e3f82d53105006c640a95e48abb6f6f91c776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function ifInsideLoop()
{
  var cond = true, intCond = 5, count = 0;
  for (var i = 0; i < 100; i++) {
    if (cond)
      count++;
    if (intCond)
      count++;
  }
  return count;
}
assertEq(ifInsideLoop(), 200);