1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// length, string var expected = "3,6,4,3,6,4,3,6,4,3,6,4,"; var actual = ''; function f() { var ss = [ "abc", "foobar", "quux" ]; for (var i = 0; i < 12; ++i) { actual += ss[i%3].length + ','; } } f(); assertEq(actual, expected);