CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Summing with a For Loop

JavaScript code walkthrough · Question 12
easyLoops

Code

Read carefully. What does this print?
1let sum = 0;
2for (let i = 1; i <= 5; i++) {
3 sum += i;
4}
5console.log(sum);

Your answer