Get to know MDN better
The loop statement creates a label that can later be branched to with a br. The loop instruction doesn't loop by itself; you need to branch to it to actually create a loop.
The loop statement is the opposite of the block statement, in the sense that while branching to a loop jumps to the beginning of the loop, branching to a block jumps to the end of the block, that is, out of the block.
| loop | 0x03 |
This page was last modified on Nov 23, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.