Lua - break statement

Published 2014/03/05 by Admin in LUA

The break statement is used to exit a loop.

a = 0

while true do

a = a+1

if a==10 then 

break

end

end

print(a)

Output:

10


Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

my coding

This is a collection of all the coding gems I have found and would like to share with the world!