I know that setTimeout
is an API which runs asynchronously and I wanted to run it synchronously. Using async/await
like below should print bla bla
first but I get bla
first.
async function testing(){
console.log("testing function has been triggered");
await setTimeout(function () {
console.log("bla bla")
}, 4200)
console.log("bla");
}