JSFiddle - React, Tailwind, and code Playground
by JamesD
HTML
<button onclick="example()">Click here</button>
<p>The above button will cause an alert to appear when one million iterations of a for loop have occurred.</p>
JavaScript
function example() {
for (var i = 0; i <= 1000000; i++)
if (i === 1000000)
alert("One million iterations have happened.");
}