summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/basic/inArrayTest.js
blob: d57f013fd329834b2f359f7a69bfbe7a2334da23 (plain)
1
2
3
4
5
6
7
8
9
function inArrayTest() {
    var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
    for (var i = 0; i < a.length; i++) {
        if (!(i in a))
            break;
    }
    return i;
}
assertEq(inArrayTest(), 10);