codingtcher.com
Theme Night
Home
Login

Setinterval in javascript

//javascript setinterval
setInterval(function() {
  //Your code
}, 1000); //Every 1000ms = 1sec

//js setinterval
function func(){
  console.log("Ran")
}
setInterval(func,1000)//Runs the "func" function every second

//javascript setinterval
setInterval(function(){ 
	console.log("Oooo Yeaaa!");
}, 2000);//run this thang every 2 seconds

//javascript settimeout
setTimeout(function(){ alert("Hello"); }, 3000);

//setinterval jquery
setInterval(function(){ 
  // stuff needs to be done
}, 3000);

Related Code