JavaScript settimeut
setTimeout(function(){ alert("Hello"); }, 3000);
Bald Eagle
setTimeout(function(){ alert("Hello"); }, 3000);
setInterval(function(){
console.log("Oooo Yeaaa!");
}, 2000);//run this thang every 2 seconds
setTimeout(() => { alert('Hello') }, 1000)
function func(){
console.log("Ran")
}
setInterval(func,1000)//Runs the "func" function every second
setInterval(function(){
console.log("Hello World!");
}, 2000); //run this script every 2 seconds(specified in milliseconds)
setInterval(function() {
//Your code
}, 1000); //Every 1000ms = 1sec