diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testForEach.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testForEach.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testForEach.js b/js/src/jit-test/tests/basic/testForEach.js new file mode 100644 index 000000000..09f6c8d9c --- /dev/null +++ b/js/src/jit-test/tests/basic/testForEach.js @@ -0,0 +1,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 "); |