Worker Calculation
Preview
Code
<button onclick="calc()">Run Calculation</button>
<p id="calc"></p>
<script>
function calc(){
var worker=new Worker("worker.js");
worker.onmessage=function(e){
document.getElementById("calc").innerText=e.data;
};
}
</script>