The while
loop is conventional, but it also has a postfix form.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# Some counting with a while. a = 0 while a < 15 print a, " " if a == 10 then print "made it to ten!!" end a = a + 1 end print "\n" # Here's a way to empty an array. joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] print(joe.pop, " ") while joe.size > 0 print "\n" |