JSFiddle - React, Tailwind, and code Playground

by ikbelkirasan

HTML

<span> counter:  </span>
<p id="value">1</p>

JavaScript

$( document ).ready(function() {
    	var handle, counter=1;
    	handle = setInterval(function(){
        //if (counter > 10) clearInterval(handle);
        $('#value').text(counter);
        counter = counter + 1;
        }
    }, 1000); 		
});