In the following code, I have Array.forEach, It executes the doSomething synchronous function in sequence:
items.forEach(function(i
You can only run those funcs in order (maybe this is what you need), for this use eachSeries function instead of each. Here is a short documentation for eachSeries:
The same as each only the iterator is applied to each item in the array in series. The next iterator is only called once the current one has completed processing. This means the iterator functions will complete in order.
Expression synchronous function in parallel - has no sence actually. Parallel means async execution.