I have question for "for" function.
Numberic For can
But I want to make a reverse
do there any method to achieve this?
or only do a stupid thing like
Any other method?
Thanks~
Numberic For can
for i = 2,5 do
print(i) -- This return 2 ..3..4..5
end --for
But I want to make a reverse
for i = 5,2 do
print(i) -- Hope display 5..4..3..2..but fail
end --for
do there any method to achieve this?
or only do a stupid thing like
local loop1 = 5 - 2 + 1
local loop2 = 5
for i = 1,loop1 do
print(loop2)
loop2 = loop2 - 1 -- display 5..4..3..2
end-for
Any other method?
Thanks~