| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Table/length | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since October 2017.
The read-only length prototype property of the WebAssembly.Table object returns the length of the table, i.e., the number of elements in the table.
The following example creates a new WebAssembly Table instance with an initial size of 2 and a maximum size of 10:
const table = new WebAssembly.Table({
element: "anyfunc",
initial: 2,
maximum: 10,
});
Grow the table by 1 using WebAssembly.grow():
console.log(table.length); // 2
table.grow(1);
console.log(table.length); // 3
| Specification |
|---|
| WebAssembly JavaScript Interface # dom-table-length |
This page was last modified on Apr 22, 2025 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |