JSFiddle - React, Tailwind, and code Playground
by vasi_32
JavaScript
function init() {
var count=5;
var counter=setInterval(timer,1000);
function timer(){
console.log('a')
count=count-1;
if(count==0){
alert("This is an alert")
//window.location = "http://www.example.com";
return;
}
}
}
window.onload = init;