var ITERATIONS = 10000; var s = ""; for (var i = 0; i < ITERATIONS; i++) { s += "a" + i; } s.length