var ITERATIONS = 1000000; var sum = 0; for (var i = 0; i < ITERATIONS; i++) { sum += i; } sum