> For the complete documentation index, see [llms.txt](https://augustus-pash.gitbook.io/wasm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://augustus-pash.gitbook.io/wasm/algorithms/hello-world.md).

# Hello World

```javascript
(module
  (import "console" "log" (func $log (param i32 i32)))
  (import "js" "mem" (memory 1))
  (data (i32.const 0) "Hello World")
  (func (export "hello")
    
    i32.const 0
    i32.const 11 
    call $log))
```

### Imports

```javascript
var memory = new WebAssembly.Memory({initial:1});

function consoleLogString(offset, length) {
    var bytes = new Uint8Array(memory.buffer, offset, length);
    var string = new TextDecoder('utf8').decode(bytes);
    console.log(string);
}


var importObject = { console: { log: consoleLogString }, js: { mem: memory } };
```
