getDownloadUrl on an Array of videos

Hi Jared. Yeah, the function that holds the for loop will need to be defined as async. Wrapping it up in an anonymous async function has the same effect as before, where it fires off a async call and then logs urlVideoArray before it is finished. Try moving the console.log inside of the anonymous function like this:

(async()=>{
let urlVideoArray=[];
for(constfileNameofvideoArray {
let video=awaitmediaManager.getDownloadUrl(fileName);
urlVideoArray.push(video)
}
console.log(“urlVideoArray”,urlVideoArray)

// Note that any other processing on urlVideoArray needs to be done in this function as well. 

});