summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNewArrayCount2.js
blob: 6318e4c25f3e4e72b519fae4fe3b4c30d884a600 (plain)
1
2
3
4
5
6
7
8
function testNewArrayCount2() {
    function count(a) { var n = 0; for (var p in a) n++; return n; }
    var x = 0;
    for (var i = 0; i < 10; ++i)
        x = count(new Array(1,2,3));
    return x;
}
assertEq(testNewArrayCount2(), 3);