lab 4
This commit is contained in:
22 files changed
+1166
No files matched your search
@@ -0,0 +1,13 @@
|
||||
mod utils;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
fn alert(s: &str);
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn greet(s: &str) {
|
||||
alert(&format!("Hello, {s}!"));
|
||||
}
|
||||
Reference in new issue
Block a user