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);