> For the complete documentation index, see [llms.txt](https://augustus-pash.gitbook.io/wasm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://augustus-pash.gitbook.io/wasm/structures/if.md).

# IF

```javascript
(func (export "testif") (result i32)
    (local $t i32)
    (set_local $t (i32.const 0))
    i32.const 0 
    i32.const 11 
    i32.eq 
    if $i0
      (set_local $t (i32.const 5)) 
    else 
      (set_local $t (i32.const 2))
    end
    get_local $t
  )
```
