Examples
Defining a function
function functionName() -- define the function
end -- end the function, sort of like a break point for the functionRunning a function
function functionName() -- define the function
end -- end the function, sort of like a break point for the function
functionName() -- run the functionLoops
local num = 0
function checkNum()
while num < 20
do
num = num + 1
if num == 19
then
-- do something and stop the loop
break
end
end
endLast updated
Was this helpful?