Well, look at your exit condition- it's the second part of the for loop declaration (i < arr.length). The for loop exits when that evaluates to false. But if you're starting at length-1 and only...
Type: Posts; User: KevinWorkman
Well, look at your exit condition- it's the second part of the for loop declaration (i < arr.length). The for loop exits when that evaluates to false. But if you're starting at length-1 and only...
So now do you have it figured out?
When do you expect that loop to exit?
Okay, and what did you expect to happen?
What is your question? What is the problem? What does this code do? What is it supposed to do? Please see the link in my signature on asking questions the smart way.
You decrement exactly how you...