Get 20% off all career paths from fullstack to AI
Start speaking a new language. It’s just 3 weeks away.
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial explains JavaScript callbacks, Promises, and async/await, then applies them with Fetch to retrieve and post data from APIs. It concludes by organizing the code into single-responsibility functions.
Syllabus
Intro
What is a callback function?
What is the problem with callbacks?
JavaScript Promises have 3 states
A promise may not return a value where you expect it to: You need to wait for a promise to resolve
Using thenables with a promise
An easy mistake to make with promises
Creating an async function
Applying await inside the function
Example 1: Retrieving user data
Example 2: Retrieving dad jokes
Example 3: Posting data
Example 4: Retrieving data with URL parameters
Abstract it all into single responsibility functions
Taught by
Dave Gray