Loops as Expressions
Like return
, break
accepts a value. This can be used to yield a value from a
loop. Loops in Zig also have an else
branch, which is evaluated when the loop
is not exited with a break
.
Like return
, break
accepts a value. This can be used to yield a value from a
loop. Loops in Zig also have an else
branch, which is evaluated when the loop
is not exited with a break
.