I'm here starting to learn Lua, and I made a simple loop to understand this. It's supposed to print out 10-100 by seeing every number 1-100 that has a remainder of zero with modulus.
The code is as follows:
i=1
while i<=100
do i = i+1
if i%10 == 0 then
print(i)
end
end
I expect the output to be: 10 20 30 40 50 60 70 80 90 100
Instead, the output is this: 20 30 40 50 60 70 80 90 100 true
I have no idea why 10 isn't getting printed, and I have no real idea when i turned into "true". I'm using Lua 5.1 with SciTE. Thanks in advance.