I need some help with the asynchronous nature of node.js. I have a for loop, which collects data from the database. \"result\" is an array, which should then be returned to
arr - An array to iterate over. iterator(item, callback) - A function to apply to each item in arr. callback(err) - Optional. A callback which is called when all iterator functions have finished, or an error occurs.