Deviopath › JavaScript

Load User Names

Medium · Async

The helper fakeFetch(id) returns a Promise that resolves to a user object like { id: 1, name: "User 1" }.

Write an async function getUserNames that takes an array of ids and returns an array of the matching names, in the same order.

Next: Group Anagrams