From 169cbdc3b87e622a5caacef22c4de577488a6d11 Mon Sep 17 00:00:00 2001 From: Stanley Wang Date: Thu, 19 Dec 2024 08:10:04 +0800 Subject: [PATCH] docs: fix typos in wasm mjs example (#7333) --- .../pages/en/learn/getting-started/nodejs-with-webassembly.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/site/pages/en/learn/getting-started/nodejs-with-webassembly.md b/apps/site/pages/en/learn/getting-started/nodejs-with-webassembly.md index 05a8dcadfe300..eb6dbcd55a2bd 100644 --- a/apps/site/pages/en/learn/getting-started/nodejs-with-webassembly.md +++ b/apps/site/pages/en/learn/getting-started/nodejs-with-webassembly.md @@ -66,7 +66,7 @@ WebAssembly.instantiate(wasmBuffer).then(wasmModule => { import fs from 'node:fs/promises'; // Use readFile to read contents of the "add.wasm" file -const wasmBuffer = await fs.readFile('path/to/add.wsm'); +const wasmBuffer = await fs.readFile('/path/to/add.wasm'); // Use the WebAssembly.instantiate method to instantiate the WebAssembly module const wasmModule = await WebAssembly.instantiate(wasmBuffer); @@ -76,7 +76,7 @@ const { add } = wasmModule.instance.exports; const sum = add(5, 6); -console.log(sum); // Outputs 11 +console.log(sum); // Outputs: 11 ``` ## Interacting with the OS