PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/zpao/v8monkey
JavaScript | 11 lines | 11 code | 0 blank | 0 comment | 1 complexity | 795aeb10c6c9a0ce6f10a3f2a8859853 MD5 | raw file
 1function dependentStrings()
 2{
 3  var a = [];
 4  var t = "abcdefghijklmnopqrst";
 5  for (var i = 0; i < 10; i++) {
 6    var s = t.substring(2*i, 2*i + 2);
 7    a[i] = s + s.length;
 8  }
 9  return a.join("");
10}
11assertEq(dependentStrings(), "ab2cd2ef2gh2ij2kl2mn2op2qr2st2");