JSFiddle - React, Tailwind, and code Playground
HTML
<div class="test"></div>
JavaScript
var i = 0,
T =setInterval(function(){
i < 10 ? $(".test").html(++i) : clearInterval(T);
},1000);
$(".test").html(i);
<div class="test"></div>
var i = 0,
T =setInterval(function(){
i < 10 ? $(".test").html(++i) : clearInterval(T);
},1000);
$(".test").html(i);