Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Callbacks, Promises, Async Await - JavaScript Fetch API Explained

Dave Gray via YouTube

Overview

Learn about Callbacks, Promises, and Async Await in JavaScript while exploring the JavaScript Fetch API. The course covers the concepts of callback functions, problems with callbacks, JavaScript Promises, thenables, async functions, and await usage. Through examples, you will retrieve data from various APIs using Fetch. The teaching method includes theoretical explanations followed by practical demonstrations. This course is intended for individuals interested in mastering asynchronous JavaScript programming and utilizing Fetch API effectively.

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

Reviews

Start your review of Callbacks, Promises, Async Await - JavaScript Fetch API Explained

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.