JavaScript Async Await

One of the hardest things about writing good JavaScript is dealing with heavily nested asynchronous code. Promises were created to solve the problem with callback hell, but there are still plenty of nested problems related to promises. This is where async/await comes in. JavaScript added async/await to allows developers to write asynchronous code in a way that looks and feels synchronous. This helps to remove many of the problems with nesting that promises have, and as a bonus can make asynchronous code much easier to read and write. In this video I am going to explain what async/await is and how to use async/await to rewrite your existing promise based code.

Learn Promises First:




#JavaScript #AsyncAwait #Promises

45 thoughts on “JavaScript Async Await

  1. I don't get it… everyone always just shows console.log… but what if I actually want to do something with it?
    when I do fetchedStuff = doWork() and console.log that fetchedStuff, I always only get a promise printed in console…

  2. This video was really helpful. For a while now I werent able to fully understand how Async Await worked, but after watching this video I finally understand it.

  3. async & await are important especially when making an online framework (for example Discord API framework – Discord.js often uses Promise and async & await). If you need to talk with a remote server, you'll have to know how to use asynchronous code.

  4. I dont usually write comments in youtube but.. damn..
    By chaining your videos one after another explaining different concepts I now understand all this javascript spaghetti. Also your videos are very high quality and you are a very good explainer.

  5. thanks for this great video,
    just a personal opinion you should think about improve your voice. It's like you talk in the same rhythm I think you should make it up and down and using stressing.
    it's hard for me to explain in English if you want, you should talk to some voice expert. wish you best sir

Leave a Reply

Your email address will not be published. Required fields are marked *