JSFiddle - React, Tailwind, and code Playground

by Kabeer Rifaye

HTML

Count: <span id="timer"></span>

JavaScript

var count = 0;

setInterval(function(){
    count++;
    console.log(count);
    document.getElementById("timer").innerHTML = count;
},1000); //(It's works).