JSFiddle - React, Tailwind, and code Playground
HTML
<img src="http://thinkfuture.com/wp-content/uploads/2013/10/loading_spinner.gif" />
<button>click here</button>
<p></p>
JavaScript
$('button').click(function(){
myFunction();
});
function myFunction() {
var text = "";
var i = 0;
while (i < 50500) {
text += "<br>The number is " + i;
i++;
}
$("p").append(text);
}