Javascript Loop Through Array And Return New Promise