javascript sync calls at end or in loop code example
Example: javascript + sync for loop
for(const elment of arrayElements) {
await yourFunc(elment)
await yourOtherFunc('somePatameter')
}
for(const elment of arrayElements) {
await yourFunc(elment)
await yourOtherFunc('somePatameter')
}