Question
in javascript Write a function that takes a list of user IDs, returns a promise/callback with their names, and can do all the requests concurrently,
in javascript Write a function that takes a list of user IDs, returns a promise/callback with their names, and can do all the requests concurrently, rather than sequentially. The following endpoint: https://jsonplaceholder.typicode.com/users/ Returns some information about a particular user: // GET https://jsonplaceholder.typicode.com/users/1 { "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "Sincere@april.biz", "address": { ... }, "phone": "1-770-736-8031 x56442", "website": "hildegard.org", "company": { ... } } // GET https://jsonplaceholder.typicode.com/users/2 { "id": 2, "name": " Ervin Howell", "username": "Sky", "email": "Ultra@april.biz", "address": { ... }, "phone": "1-770-736-8031 x56443", "website": "hildegard.org", "company": { ... } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started