Mapping Over Promises in JavaScript
Hey there, did you recently run into the issue where you expected the result of your map function to return a resolved/awaited value? For example:
const result = ids.map(async (id) => {
return await fetchData(id);
});
//expected: [{name: "Adam"}, ...
pmbanugo.hashnode.dev4 min read