There are several use cases of resolving promise in Javascript.
const sequentialFn = async () => {
for (const item of list) {
await task(item);
}
}
It may seem to be the same as other iterable function method but there is a significant difference in behaviour and this will get the job done.
Thanks for reading, cheers!