PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/basic/testThinForEach.js

http://github.com/zpao/v8monkey
JavaScript | 10 lines | 10 code | 0 blank | 0 comment | 3 complexity | 1f8056d13215a37034ae81f0c2b55d64 MD5 | raw file
 1function testThinForEach() {
 2    var a = ["red"];
 3    var n = 0;
 4    for (var i = 0; i < 10; i++)
 5        for each (var v in a)
 6            if (v)
 7                n++;
 8    return n;
 9}
10assertEq(testThinForEach(), 10);