easy5 pts · first answer countsjavascriptasync-await
map with an async callback
What does this print?
const ids = [1, 2, 3]
const users = ids.map(async (id) => ({ id }))
console.log(users.length, users[0] instanceof Promise)Discussion 0
Join free to post in the discussion.
Related questions
- fetch and error status codesFull Stack Developer
- Timer vs promise orderFull Stack Developer
- try/catch around an async callFull Stack Developer
- Dates sent through JSONFull Stack Developer
- One failing widget breaks the dashboardFull Stack Developer
- Three awaits, three times slowerFull Stack Developer
- Birthday shows one day earlyFull Stack Developer
- Large IDs change in the browserFull Stack Developer