Skip to content
Quiz · Conditions and loops · lesson 4 of 13

Quiz — a sum in a loop

What does the program print?

JavaScript
let s = 0;
for (let i = 1; i < 5; i++) {
    s += i;
}
console.log(s);

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way