Created
August 13, 2018 09:27
-
-
Save rohanBagchi/331353544efe7edc859780d6712a506e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(() => { | |
const btn = document.getElementById("calculate_btn"); | |
const res = document.getElementById("result"); | |
btn.addEventListener("click", e => { | |
res.innerHTML = "Loading..."; | |
const val = doLongCalculation(); | |
const shortenedData = val.slice(0, 50).join(", ") + "..."; | |
res.innerHTML = shortenedData; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment