JSFiddle - React, Tailwind, and code Playground
JavaScript
a = 100;
var i = setInterval( timer, 1000 );
function timer() {
console.log( a );
if ( a < 1 ) {
console.log( 'Reaching Stop' );
clearInterval( i );
return;
}
a -= 1;
}