break
Basic Usage with "for" Loop:
# Using 'break' keyword in 'for' loop
for var i = 1 to 5 then
if i == 3 then
break # Exit the loop when i is 3
end
show(i)
endExplanation:
Basic Usage with "while" Loop:
var i = 0
# Using 'break' keyword in 'while' loop
while i < 5 then
i = i + 1
if i == 3 then
break # Exit the loop when i is 3
end
show(i)
endExplanation:
Usage in Nested Loops:
Explanation:
Last updated