diff options
Diffstat (limited to 'entries/adirar111/wasm/index.js')
-rw-r--r-- | entries/adirar111/wasm/index.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/entries/adirar111/wasm/index.js b/entries/adirar111/wasm/index.js index 43ee9a6..667ff82 100644 --- a/entries/adirar111/wasm/index.js +++ b/entries/adirar111/wasm/index.js @@ -10,8 +10,10 @@ WebAssembly.instantiateStreaming(fetch(wasmBinaryDataURL)).then( const result = document.getElementById("result") const n = parseInt(input.value) if (isNaN(n)) { - result.textContent = "that's not a number..." - return + return result.textContent = "that wasn't very wasm of you" + } + if (n < 0) { + return result.textContent = "why are you being so negative" } result.textContent = fibWasm(n) } |