Difference between revisions of "Continue"

From MiniScript Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
<c>continue</c> is a [[:Category:Keywords|keyword]] statement that causes execution to jump directly to the next iteration of a [[for]] or [[while]] loop.
 
<c>continue</c> is a [[:Category:Keywords|keyword]] statement that causes execution to jump directly to the next iteration of a [[for]] or [[while]] loop.
 +
 +
See also: [[break]]
  
 
== Example ==
 
== Example ==

Latest revision as of 18:41, 28 May 2022

continue is a keyword statement that causes execution to jump directly to the next iteration of a for or while loop.

See also: break

Example

s = "I never could get the hang of Thursdays."
result = ""
for c in s
   if c == "a" or c == "e" then continue
   result = result + c
end for
print result

Output:

I nvr could gt th hng of Thursdys.