Nested JavaScript Loops Containing Async Functions That are Forced to Run Synchronously

Sometimes you may need to a lot of processing in a loop. Each loop may call an asynchronous function, e.g. calling an external URL or writing to a file. If this needs to be done synchronously, you can use the async JavaScript library.