The valueOf method of the WebAssembly.Global object prototype returns the value contained inside the global variable.
valueOf()None.
A string indicating the value of the global.
const myGlobal = new WebAssembly.Global({ value: "i32", mutable: true }, 42);
// 42
console.log(myGlobal.valueOf());global definition