From dffe7c462fc7353f33c848b9b293c30dbccca073 Mon Sep 17 00:00:00 2001 From: stanley2058 Date: Tue, 17 Dec 2024 19:54:24 +0800 Subject: [PATCH] docs: fix typos in wasm mjs example --- .../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