timeout javascript
snippet in javascript

javascript settimeout

user9708

setTimeout(function(){
 	alert("Sup!"); 
}, 2000);//wait 2 seconds

settimeout js

user3440


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

 //1000ms = 1 second

timeout javascript

user6498

setTimeout(function(){
 	//code goes here
}, 2000); //Time before execution

javascript settimeout

user5666


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

js settimeout

user3777

setTimeout(() => { alert('Hello') }, 1000)

javascript run something after x seconds

user7681

setTimeout(function(){
  location.reload();
}, 3000); //run this after 3 seconds