Tips For Using Async/Await in JavaScript
James Q Quick
Async/Await is a much cleaner syntax for working with promises than using .then(). Letβs take a look at how to convert an asynchronous function from using .then() to using async/await and learn a few tips along the way.
00:00 β Intro
00:45 β Fetch Example with .then
01:30 β Convert Promises to Async/Await
04:40 β Use Try/Catch for Errors
06:30 β Async Functions Return a Promise
07:40 β Use IIfe for Top-Level Await
09:00 β Promise.all()
_____________________________________________
Newsletter
Interested in exclusive content and discounts? Sign up for the newsletter!
https://www.jamesqquick.com
_____________________________________________
Connect with me
Live streams on Twitch β https://twitch.tv/jamesqquick
Follow me on Twitter β https://www.twitter.com/jamesqquick
Join the Discord Server
β https://discord.gg/vM2bagU
_____________________________________________
COURSES
Learn how to build Fullstack apps with React and Serverless Functions β https://www.jamesqquick.com/courses/react-and-serverless-fullstack-developmnent
Learn everything you need to know about Visual Studio Code β https://www.udemy.com/learn-visual-studio-code/
Build a Quiz App β https://www.udemy.com/build-a-quiz-app-with-html-css-and-javascript/