JSFiddle - React, Tailwind, and code Playground

by Yuriy Petrichenko

JavaScript

var count = 0;
function s(){
console.log(count);
count++;
if(count == 20){
clearInterval(x);
}
}
var x = setInterval(s,1000);