Rest API - Batch and Bulk Operations
Identify the issue in this async batch code:
async function fetchData() {
const urls = ['url1', 'url2'];
const data = urls.map(async url => {
const response = await fetch(url);
return response.json();
});
console.log(data);
}
fetchData();