8. last practise for loop


#1

// Write your very own for loop!
for ( var i = 100; i < 0; i -=5) {

}
console.log(i);

comes up with oops didnt log 95 to the console!
what am i doing wrong?


#2

figured it our correct code is

// Write your very own for loop!

for ( var i = 100; i >= 1; i -=5) {
console.log(i);
}


#3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.