1//Here i have filmresponse.json() which will return promise so i uses promise.
2//all otherwise it won't be possible to run it
3
4let characterResponse = await fetch('http://swapi.co/api/people/2/')
5let characterResponseJson = await characterResponse.json()
6let films = await Promise.all(
7 characterResponseJson.films.map(async filmUrl => {
8 let filmResponse = await fetch(filmUrl)
9 return filmResponse.json()
10 })
11)
12console.log(films)
13