summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/for-of/break-1.js
blob: 1a1e528eb8932a31cc5d51f126728a2015c82c4b (plain)
1
2
3
4
5
6
7
8
9
// A break statement leaves a for-of loop.

var log = '';
for (var x of ['a', 'b', 'c']) {
    log += x;
    if (x === 'b')
        break;
}
assertEq(log, "ab");