Javascript Loop Through Array From Asynchronous Learning