summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testif.js
blob: f7b2864e90b073ac868f0e7e60cecda6cb88d422 (plain)
1
2
3
4
5
6
7
8
9
10
11
function testif() {
    var q = 0;
    for (var i = 0; i < 100; i++) {
        if ((i & 1) == 0)
            q++;
        else
            q--;
    }
    return q;
}
assertEq(testif(), 0);