From the course: Level Up: JavaScript

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Five friends

Five friends

(video game music) - Functions declared with the async keyword allow us to write asynchronous code in a synchronous manner. And together with the fetch API, we can make asynchronous API requests. (electronic tones) In this challenge, you're building a new component for Your Space, a brand new social media application that allows you to find friends. This component displays a user's top five friends. Given some JSON data returned from the random user API, you should dynamically generate image thumbnails for the top five friends. You should use the fetch API to call the random user API. You can use the URL https://randomuser.me/api/?results=5 to get data for five users. Your solution should also use async/await. (electronic tones) Pause the video here, develop your solution, and when you're ready, come back, and I'll walk you through how I solve the challenge. (video game music) Let's start by declaring our asynchronous…

Contents