summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/matchInLoop.js
blob: 89f40ac5fd4432e3d77f66092c8e4ae158a1a1bd (plain)
1
2
3
4
5
6
7
8
function matchInLoop() {
    var k = "hi";
    for (var i = 0; i < 10; i++) {
        var result = k.match(/hi/) != null;
    }
    return result;
}
assertEq(matchInLoop(), true);