6 ms·
Would this not also work? async function getPeople() { const members = fetch("/members"); const nonMembers = fetch("/non-members");
by uDontKnowMe 6y ago
Would this not also work?
async function getPeople() {
const members = fetch("/members");
const nonMembers = fetch("/non-members");
return (await members).concat(await nonMembers);
}
- deleted 6y ago[deleted]
- brundolf 6y agoInteresting, it actually does. I agree that's cleaner than the Promise.all() pattern.