JSFiddle - React, Tailwind, and code Playground
JavaScript
var count = 0;
function s(){
console.log(count);
count++;
if(count == 20){
clearInterval(x);
}
}
var x = setInterval(s,1000);
var count = 0;
function s(){
console.log(count);
count++;
if(count == 20){
clearInterval(x);
}
}
var x = setInterval(s,1000);