summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/initarrayelem-hole-value.js
blob: 65629e862cca67dec29e2c41e8cfb1e458f8ecf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var g = newGlobal({newCompartment: true});
g.parent = this;
g.evaluate(`var dbg = new Debugger(parent); dbg.onEnterFrame = function(){};`);

function f() {
    for (var i = 0; i < 10; i++) {
        var arr = [1, 2, , i];
        assertEq(2 in arr, false);
        assertEq(3 in arr, true);
    }
}
f();