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