while loop

A while loop repeats a block of code as long as a given condition is true.

for condition do trace("executed code") end

For example: This while loop below will iterate and trace 1 to 5

local i = 1 while i <= 5 do trace("Iteration: "..i) i = i + 1 end

We can see this example clearly in the Translator by navigating the loops in the .