JSFiddle - React, Tailwind, and code Playground

by iamthestig

HTML

<!DOCTYPE html>
<html>
<body>

<p>Click the button to loop through a block of code five times.</p>
<button onclick="myFunction1()">Try it</button>
<p id="demo"></p>
    
<p>Click the button to loop through a block of code five times.</p>
<button onclick="myFunction2()">Try it</button>
<p id="demo2"></p>

<script>
function myFunction1()
{
var x="";
for (var i=105000;i<205000;i+=5000)
  {
  x=x + "The number is " + i + "<br>";
  }
document.getElementById("demo").innerHTML=x;
}
    
    
function myFunction2()
{
var x="";
for (var i=110000;i<210000;i+=10000)
  {
  x=x + "The number is " + i + "<br>";
  }
document.getElementById("demo2").innerHTML=x;
}
</script>

</body>
</html>