let sum = 0 for (i = 1; i <= N; i++) { sum += i; } console.log(sum);