Using Loops and Break Statements
With the loop expression, the expressions in the loop block are repeated for every iteration of the loop.
The GIF below of the Fortnite Emote Clean Sweep is an example of how a loop works. The GIF plays to the end, then repeats from the beginning, and the player emoting is like the expressions in a loop block.

| | |
| --- | --- |
| | # GIF |
| | loop: |
| | DoCleanSweepEmote() |
GIF
loop: DoCleanSweepEmote()
Copy full snippet(3 lines long)
Like a GIF, a loop block will repeat forever unless instructed to do otherwise. This is called an infinite loop.
Infinite loops are not very useful in most cases since they will block progress for the program, so Verse provides a way to end and / or suspend.
- End: You can end a loop by exiting with either break or
return. - Suspend: You can suspend a loop if it's used in an
asyncexpression. See Concurrency Overview for more details.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.