1async function getAllUrls(urls) {
2 try {
3 var data = await Promise.all(
4 urls.map(
5 url =>
6 fetch(url).then(
7 (response) => response.json()
8 )));
9
10 return (data)
11
12 } catch (error) {
13 console.log(error)
14
15 throw (error)
16 }
17}
18