syncTest.js
425 Bytes
function fetchItem(){
return new Promise(function(resolve,reject){
setTimeout(function(){
resolve();
console.log("resolved");
},3000)
})
}
async function hello(){
await fetchItem();
await fetchItem();
await fetchItem();
await fetchItem();
await fetchItem();
await fetchItem();
console.log("resolve Complete")
}
hello();