The final code still has major issues.

You’re right, the example might run into issues with actual async function. I will update the example to better demonstrate the concept. But to solve the issue with the current example, you can create an outputArray with correct order of characters, and only join the array into the output when all callback have responded. I have created a JsFiddle of the solution here

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.