how to make a synchronous wait function js code example
Example: 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");