• Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Technology

      Web technology reference for developers

  • Guides
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • MDN Plus
    • Overview

      More MDN. Your MDN.

    • FAQ

      Frequently asked questions about MDN Plus

  • Already a subscriber?
  • Get MDN Plus
  1. WebAssembly
  2. WebAssembly instructions
  3. WebAssembly numeric instructions
  4. Const

In this article

  • Try it
  • Syntax

Related Topics

  1. WebAssembly home page
  2. Tutorials
    1. WebAssembly concepts
    2. Compiling from C/C++ to WebAssembly
    3. Compiling from Rust to WebAssembly
    4. Using the WebAssembly JavaScript API
    5. Understanding WebAssembly text format
    6. Converting WebAssembly text format to wasm
    7. Loading and running WebAssembly code
    8. Caching compiled WebAssembly modules
    9. Exported WebAssembly functions
  3. Object reference
    1. WebAssembly
    2. WebAssembly.Module
    3. WebAssembly.Global
    4. WebAssembly.Instance
    5. WebAssembly.Memory
    6. WebAssembly.Table
    7. WebAssembly.CompileError
    8. WebAssembly.LinkError
    9. WebAssembly.RuntimeError

In this article

  • Try it
  • Syntax

Const

The const instructions, are used to declare numbers.

Try it

Syntax

;; push `5` onto the stack
i32.const 5
Instruction Binary opcode
i32.const 0x41
i64.const 0x42
f32.const 0x43
f64.const 0x44

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Apr 21, 2022, by MDN contributors

MDN logo

Your blueprint for a better internet.

  • MDN on Twitter
  • MDN on GitHub

MDN

  • About
  • Hacks Blog
  • Careers

Support

  • Product help
  • Report a page issue
  • Report a site issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
Mozilla logo
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2022 by individual mozilla.org contributors. Content available under a Creative Commons license.