summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/getelem-string.js
blob: b187e5b68bcccafdaa021912dd64954c8478ed1f (plain)
1
2
3
4
5
6
7
8
9
10
11
function test1() {
    function getchar(s, i) {
        return s[i];
    }
    for (var i=0; i<70; i++) {
        assertEq(getchar("foo", 0), "f");
        assertEq(getchar("bar", 2), "r");
    }
    assertEq(getchar("foo", 3), undefined);
}
test1();