Commit 37b4ac30e62c4f6231159e7952dc6e45fae7b4be

Authored by Georg Hopp
1 parent f0f8e31b

wasm exercise 1

... ... @@ -14,6 +14,6 @@ extern {
14 14 }
15 15
16 16 #[wasm_bindgen]
17   -pub fn greet() {
18   - alert("Hello, {{project-name}}!");
  17 +pub fn greet(s :&str) {
  18 + alert(&format!("Hello, {}!", s));
19 19 }
... ...
1 1 import * as wasm from "wasm-game-of-life";
2 2
3   -wasm.greet();
  3 +wasm.greet("It's all a game");
... ...
Please register or login to post a comment