How to correctly construct a loop to make sure the following promise call and the chained logger.log(res) runs synchronously through iterat
Use async and await (es6):
function taskAsync(paramets){ return new Promise((reslove,reject)=>{ //your logic after reslove(respoce) or reject(error) }) } async function fName(){ let arry=['list of items']; for(var i=0;i