Node loop restarting before it is finished?

Did you look up Array.map() as I suggested? It allows you to easily specify how to convert each each element of an array into an element of a new array without all that tedious looping.