What does continue do?

I can’t find it in the developer wiki, or the devforum.

4 Likes

What do you mean “can’t find” ?

How about This

http://lua-users.org/wiki/ContinueProposal

terminate current iteration of a while , repeat , or for loop, skipping to the evaluation of the condition for the next loop iteration. Just like return and break statements, continue can only be written as the last statement of a block.

10 Likes

Did you really not find anything on the DevForum?

2 Likes

If you want an example, this prints all the odd numbers

for i = 1, 10 do
    if i%2 == 0 then
        continue
    end
    print(i)
end

As the keyword implies, it continues to the end.

6 Likes