Skip to main content
deleted 2 characters in body
Source Link

You should use map instead of forEach:

Promise.all([urls]urls.map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});

You should use map instead of forEach:

Promise.all([urls].map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});

You should use map instead of forEach:

Promise.all(urls.map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});
code format
Source Link
Floern
  • 33.9k
  • 24
  • 105
  • 121

You should use map instead of forEach:

Promise.all([urls].map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});
Promise.all([urls].map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});

You should use map instead of forEach:

Promise.all([urls].map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});

You should use map instead of forEach:

Promise.all([urls].map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});
Source Link

You should use map instead of forEach:

Promise.all([urls].map(url => fetch(url)))
.then(resp => Promise.all( resp.map(r => r.text()) ))
.then(result => {
    // ...
});