JSFiddle - React, Tailwind, and code Playground

by bionicoz

HTML

<div id="number">Number: <span></span></div>

JavaScript

$(function(){ //domready
    i=0;
    to=setInterval(function(){
    
    if(++i > 10) 
        clearTimeout(to);
    else 
        $('#number > span').text(i);
    },1000);
});