summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/dependentStrings.js
blob: 1dd38bbacb4726163f1277796eb4080d9231ffb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
function dependentStrings()
{
  var a = [];
  var t = "abcdefghijklmnopqrst";
  for (var i = 0; i < 10; i++) {
    var s = t.substring(2*i, 2*i + 2);
    a[i] = s + s.length;
  }
  return a.join("");
}
assertEq(dependentStrings(), "ab2cd2ef2gh2ij2kl2mn2op2qr2st2");