CodeNewbie Community 🌱

clovato0107
clovato0107

Posted on

for loops

I am currently having trouble with this problem:

Write a for loop that prints every third number from 0 up to and including 99, using console.log().
Use the modulo operator (%) to check if the number is divisible by 3

this is what I wrote but I am wrong:

for (let i = 0; i < 100; i++, i%3) {
console.log(i += 3);
}

Top comments (0)