js for loop sync code example
Example 1: javascript + sync for loop
for(const elment of arrayElements) {
await yourFunc(elment)
await yourOtherFunc('somePatameter')
}
Example 2: loop async javascript
const forEachLoop = _ => {
console.log('Start')
fruitsToGet.forEach(async fruit => {
const numFruit = await getNumFruit(fruit)
console.log(numFruit)
})
console.log('End')
}