9951 explained code solutions for 126 technologies


luaCreate a for loop


for i = 10,1,-1 
do 
   print(i) 
endctrl + c
for i = 10,1,-1

the loop will run from the stsrting value of i as 10 till 1 with a decrement (because of negative sign) of 1. Therefore this loop will runs for 10 times

do

statements to be evaluated comes after do

print(i)

as an example, print statement is shown

end

end of the loop