Control flow
Control flow in Motoko is expression-oriented: blocks, conditionals, switch, and loops are all expressions that evaluate to a value. This section covers each construct and the patterns that compose them.
Skip to contentFor AI agents: Documentation index at /llms.txt
Control flow in Motoko is expression-oriented: blocks, conditionals, switch, and loops are all expressions that evaluate to a value. This section covers each construct and the patterns that compose them.