(local...)
Create a local variable within a function. Right after a function is declared, with its parameters and result, you need to list all the local variables.

Syntax

(local $label type)

Parameters

$label Optional
The label name of the local variable. Each local variable can be used either with the label or using an index to it. The first local variable is given the index of 0, with the next index being 1, and so on.
type
The data type the variable uses.

Example

;; Example function
(func $example
    ;; Create local variables of different data types
    (local $age i32)
    (local $atoms i64)
    (local $height f64)
    ...
    ;; Set $age local variable
    i32.const 42
    local.set $age
    ...
)