Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript best way to create synchronous pause in program

console.log("Start");  
console.time("Promise");  
await new Promise(done => setTimeout(() => done(), 5000));  
console.log("End");  
console.timeEnd("Promise");  
 
PREVIOUS NEXT
Tagged: #javascript #create #synchronous #pause #program
ADD COMMENT
Topic
Name
5+2 =