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 - JavaScript Tutorial
From the course: Level Up: JavaScript
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
-
-
-
Available books6m 11s
-
(Locked)
Movie object5m 29s
-
(Locked)
Vegetarian dinner3m 11s
-
(Locked)
Technical books2m 33s
-
(Locked)
Private object2m 13s
-
(Locked)
Ticking time2m 17s
-
(Locked)
Classroom attendance3m 14s
-
(Locked)
Dynamic colors4m 15s
-
(Locked)
Coffee calculations3m 21s
-
(Locked)
Food truck3m 4s
-
(Locked)
Train generator3m 31s
-
(Locked)
String permutation3m 11s
-
(Locked)
Five friends3m 43s
-
(Locked)
URLify3m 55s
-
(Locked)
Password strength4m 58s
-