creating an instance in a for loop lua code example
Example 1: lua for loop
-- For K,V in table
for k,v in pairs(tbl) do
print(k)
print(v)
end
-- For i=0, num
for i=0, num do
print(i)
end
Example 2: break in lua
local i = 1
while a[i] do
if a[i] == v then break end
i = i + 1
end