settimeout js
snippet in javascript

javascript settimeout

user5028

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

settimeout js

user5637


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

 //1000ms = 1 second

timeout javascript

user1640

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

javascript settimeout

user5566


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

js settimeout

user7183

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

javascript set timeout

user5402

var timeToWait = 3000; // 1000 = 1 second
setTimeout(() => {
	console.log("Text printed after 3 seconds");
}, timeToWait);