Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/webassembly/reference/control_flow/index.md
6510 views
---
title: WebAssembly control flow instructions slug: WebAssembly/Reference/Control_flow
---

{{WebAssemblySidebar}}

WebAssembly control flow instructions.

  • block

    • : Creates a label that can later be branched out of with a br.

  • br

    • : Branches to a loop or block.

  • call

    • : Calls a function.

  • drop

    • : Pops a value from the stack, and discards it.

  • end

    • : Can be used to end a block, loop, if, or else.

  • if...else

    • : Executes a statement if the last item on the stack is true (1).

  • loop

    • : Creates a label that can later be branched to with a br.

  • nop

    • : Does nothing.

  • return

    • : Returns from a function.

  • select

    • : Selects one of its first two operands based on a boolean condition.

  • unreachable

    • : Denotes a point in code that should not be reachable.