I can make a for loop go from 0 to 10, but I can't make the for loop go from 10 to 0. For example this works:
for i = 0,10 do
but this doesn't:
for i = 10,0 do
I can make a for loop go from 0 to 10, but I can't make the for loop go from 10 to 0. For example this works:
for i = 0,10 do
but this doesn't:
for i = 10,0 do
Well, you could just do that:
for i = 0,10 do
print(10 - i)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
why not
for i=10,0,-1 do print(i) end?I suppose you could do that as well