CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #18

Divisible by Three in a Loop

easyLoops

📄 Code

Read carefully — what does this print?
1for (let i = 1; i <= 6; i++) {
2 if (i % 3 === 0) {
3 console.log("fizz");
4 } else {
5 console.log(i);
6 }
7}

🎯 Your Answer