Created
January 24, 2020 10:15
-
-
Save kdkanishka/cb9b46e69b8b10bc838662fc1f0312fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<script src="hello.js"></script> | |
<script> | |
var fibProxy = Module.cwrap("fib", "number", ["number"]); | |
function calcFib(){ | |
var input = document.getElementById("fibInput").value; | |
var result = fibProxy(input); | |
alert(result); | |
} | |
</script> | |
<body> | |
<label>Fib Calculator</label> | |
<input id="fibInput" type="text"> | |
<button onclick="calcFib()">Calculate Fib!</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment