I got problem in 5.Controlling the for loop


The exercise is

This code counts every number from 0 to 35.
Make it start counting from 5. Please!
Stop the counting when it prints out 50.
Only count every fifth number. So we want to increment i by 5.

and my code looks like....

// Edit this for loop!

for (var i = 5; i < 51; i+5) {

but it never works(it cause error, actually). i use chrome and i dunno what happens in this logic.

is there anybody has same problem?


the statement the reads


should be


you want to update the value of i in memory each time so you increment it by 5 and assign the result to i


Damn, you beat me to it. But yeah, in your for loop, you need to set the value of i to increment by 5 each time (since that's what they're asking for you to do)


Hey i have also done it that way but has failed