summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testForEach.js
blob: 09f6c8d9cde3b296df0c4dd1fc091cb82ce49561 (plain)
1
2
3
4
5
6
7
8
9
10
11
function testForEach() {
    var r;
    var a = ["zero", "one", "two", "three"];
    for (var i = 0; i < 9; i++) {
        r = "";
        for each (var s in a)
            r += s + " ";
    }
    return r;
}
assertEq(testForEach(), "zero one two three ");