JSFiddle - React, Tailwind, and code Playground

by Zacc206

HTML

<h1 id="counter"></h1>

JavaScript

$(document).ready(function(){

    var counter = 1;
    var em = $('#counter');
    
    while(counter < 100){
        
        setTimeout(function(){        
            counter++
        
            em.text(counter);
    
        }, 1000);
    }
});