So I declare a variable some where and initialize it. Now later on I need to use it to loop while its still positive so I need to decrement it. To me looping using a condition a
Use a while loop?
while (space > 0) { /* code */ space--; }
If you don't need the value of space in the body of the loop:
space
while (space-- > 0) { /* code */ }