summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug584499-2.js
blob: bb31a731e33ec31f91b7fd9a5095b21793b1f579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function f(x) {
    var s = "a";
    var last = "";
    for (var i = 0; i < 10; i++) {
        last = s[x];
    }
    return last;
}

f(0);

assertEq(f(1), undefined);