4. Ending The For Loop




We know this for loop counts from 1 to 10.
Change this for loop such that it starts at 4.
Change this for loop such that it counts up to and including 23. ( i.e. we do NOT want 24 to be printed out!)
Run your for loop and see it count from 4 to 23!

for (var i = 105; i <= 1; i  = i - 5) {

It keeps saying, "Oops, try again. Your loop should have logged 4 to the console, but didn't!"

Someone help!!!


This is not what the instructions ask for. How would we write this statement so that the output looks like this:




I don't know. Thats why I asked. Please help!!!


You have an example to work from.

for (var i = 1; i < 11; i += 1) {

Now what needs to change to output the above number list?


please give me the code. I need to finish this by today!


Don't fret. Finished it!:relieved:


Good luck. Happy coding!


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