hasna
0
Q:

how to delay something in javascript

var delayInMilliseconds = 1000; //1 second

setTimeout(function() {
  //your code to be executed after 1 second
}, delayInMilliseconds);
10
console.log("Hello");
setTimeout(() => {  console.log("World!"); }, 2000);
1
await new Promise(resolve => setTimeout(resolve, 1000));
6
setTimeout(function() {
 //your code here
}, 1000);
0
 $(this).delay(1000).queue(function() {

     // your Code | Function here
     
     $(this).dequeue();
  
  });
0
setTimeout(/*how many milaseconds you want to delay */)
0

New to Communities?

Join the community