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

Quiz — continue and break

What does the program print?

JavaScript
let out = "";
for (let i = 1; i <= 10; i++) {
    if (i % 2 === 0) {
        continue;
    }
    if (i > 7) {
        break;
    }
    out += i;
}
console.log(out);

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