Path: blob/main/files/en-us/webassembly/reference/control_flow/if...else/index.md
6510 views
------{{WebAssemblySidebar}}
The if statement executes a statement if the last item on the stack is true (1). If the condition is false (0), another statement can be executed
{{EmbedInteractiveExample("pages/wat/if...else.html", "tabbed-taller")}}
Syntax
| Instruction | Binary opcode |
|---|---|
if | 0x04 |
else | 0x05 |