Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript synchronous wait

function delay(n) {  
  n = n || 2000;
  return new Promise(done => {
    setTimeout(() => {
      done();
    }, n);
  });
}
 
PREVIOUS NEXT
Tagged: #javascript #synchronous #wait
ADD COMMENT
Topic
Name
8+5 =