Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/webassembly/reference/variables/local_tee/index.md
6532 views
---
title: Local tee slug: WebAssembly/Reference/Variables/Local_tee
---

{{WebAssemblySidebar}}

The local.tee instruction sets the value of a local variable and loads the value onto the stack.

The instruction is named after the T-splitter used in plumbing.

{{EmbedInteractiveExample("pages/wat/local_tee.html", "tabbed-taller")}}

Syntax

;; load the number 2 onto the stack i32.const 2 ;; store the number 2 in the variable $val and load it on the stack local.tee $val
InstructionBinary opcode
local.tee0x22