JSFiddle - React, Tailwind, and code Playground
by guiboy
JavaScript
function doSomethingElse(){
console.log('doingit');
}
function func1()
{
//doing something
doSomethingElse();
}
var x = 1;
var myInterval = setInterval(function(){
func1();
if (x === 10) {
myStopFunction()
}
x++
}, 3000);
function myStopFunction() {
clearInterval(myInterval);
}