Asynchronous JavaScript in ~10 Minutes - Callbacks, Promises, and Async/Await

  Рет қаралды 293,270

James Q Quick

James Q Quick

Күн бұрын

The asynchronous nature of JavaScript to understanding the language. You'll find the use of callbacks, promises, and async/await in code that you write every day as a JavaScript developer. In this JavaScript tutorial, you'll learn about all three in about 10 minutes.
00:00 - Intro
01:15 - Callbacks
03:20 - Error First Callback
05:00 - Promises
10:00 - Async/Await
____________________________________________
Newsletter 🗞
Interested in exclusive content and discounts? 🤯 Sign up for the newsletter!
www.jamesqquick.com
_____________________________________________
Connect with me 😀
Live streams on Twitch - / jamesqquick
Follow me on Twitter - / jamesqquick
Join the 💬 Discord Server 💬 - / discord
_____________________________________________
COURSES 💻
Learn how to build Fullstack apps with React and Serverless Functions - www.jamesqquick.com/courses/r...
Learn everything you need to know about Visual Studio Code - www.udemy.com/learn-visual-st...
Build a Quiz App - www.udemy.com/build-a-quiz-ap...

Пікірлер: 395
@TheYusuf10
@TheYusuf10 3 жыл бұрын
I am not a native English speaker but ur accent is most suitable for me! Thank you for ur content
@JamesQQuick
@JamesQQuick 3 жыл бұрын
Glad to hear that!
@joshhoffer
@joshhoffer 2 жыл бұрын
Hes got that standard American dialect. Not too Boston not too Texas
@rajanchawla1285
@rajanchawla1285 Жыл бұрын
@@JamesQQuick y
@rajanchawla1285
@rajanchawla1285 Жыл бұрын
55ttttttmtattu tattu tattu mm mm mmm mm mmm mm mmm mm mmm mm mmm mm@@JamesQQuickm mmmmmmm mm ttttttt mmmtmmit?mtmtttm
@rajanchawla1285
@rajanchawla1285 Жыл бұрын
@@JamesQQuick mntmmmmmmmm
@jonibs90
@jonibs90 3 жыл бұрын
My teacher taught us Asynchronous JavaScript at the end of a class in 15 minutes and I got 0% of it. Thank you for this video
@cameronthompson1275
@cameronthompson1275 3 жыл бұрын
Promises are still a struggle for me. This has helped a ton. Thanks, James!
@JamesQQuick
@JamesQQuick 3 жыл бұрын
So glad to hear that. Yes they are very tricky
@_rachid
@_rachid 3 жыл бұрын
Just keep repeating using them, after a while you'll find them so easy to grasp.
@sazaraki
@sazaraki 2 жыл бұрын
@@operationskunkworks5914 That's a very interesting point: the difference between creating and consuming a promise. Of all the tutorials I've seen on the subject, nobody has talked about that.
@ZhouJi
@ZhouJi 2 жыл бұрын
@@sazaraki not just interesting, but very fundamental. many tutorials talk about the the syntax difference between callback, promise, and async/await, but neglect the more important question about which part of your code is intended to be async (going to background in parallel) and which part is intended to block
@marcom6370
@marcom6370 2 жыл бұрын
@@sazaraki I found this video about the difference between consuming and writing a promise kzbin.info/www/bejne/iKe8inZ9qJlogpY
@goodwish1543
@goodwish1543 3 жыл бұрын
Best one on Async/Await I've seen so far. Excellent!
@jazy3091
@jazy3091 2 жыл бұрын
Thaaaaaaaaank you! This is such a beautifully simple explanation of the whole thing, starting from callbacks to async! Please keep on doing great job.
@nikolaoskonstantinidis3505
@nikolaoskonstantinidis3505 Жыл бұрын
I understood these concepts better in your 10 min video than in many others 20+ min videos. Thank you.
@andredejesus7427
@andredejesus7427 2 жыл бұрын
Watched this as a refresher and it went better than I expected! Thank you for this
@hedwigseidel1934
@hedwigseidel1934 2 жыл бұрын
One of the best explanations I have come across. Thanks a lot!
@MichaelWhyte01
@MichaelWhyte01 2 жыл бұрын
Great video…Loved your explanation of this…You made the topic very simple and easy to understand…Thanks for taking the time to make this informative video...
@elaizaespanola9652
@elaizaespanola9652 2 жыл бұрын
You explain this so quickly and so easily. Thank you for your videos. Subscribed already!
@NicoHeinrich
@NicoHeinrich 2 жыл бұрын
Thank you, this video really helped! You did a great job at explaining everything 👍
@ChikereEzeh
@ChikereEzeh Жыл бұрын
Best tutorial on async I have come across. I am 'new' to JS and will jump straight into async/await.
@anandakumarthangaraju3438
@anandakumarthangaraju3438 3 жыл бұрын
One of the best clear cut explanation.👍❤️
@divababy2974
@divababy2974 2 жыл бұрын
Thank you so much for this video! Finally somebody put them all together!
@alibaba888
@alibaba888 2 жыл бұрын
I watched a couple of videos but only this one worked for me. Thank you for the amazing explanation.
@Balaji_Devadoss
@Balaji_Devadoss 3 жыл бұрын
thats how you explain programming.. with examples ... great :)
@Diegps
@Diegps 2 жыл бұрын
This video finally helped me to understand how async works. Thank you so much!
@joecolas
@joecolas 3 жыл бұрын
thank you James for letting me understand better the JS Callbacks and Promises
@oliviaseymour3237
@oliviaseymour3237 2 жыл бұрын
Hey! I watched a lot of videos, read a lot of articles, but only YOU explained these topics in a clear way! thank you!
@JamesQQuick
@JamesQQuick 2 жыл бұрын
Yesssss! Glad to hear it :)
@pouyajavadi1751
@pouyajavadi1751 3 жыл бұрын
Well described..i will have this as a reference to implement and practice on my projects. Thank you
@nemanjastankovic941
@nemanjastankovic941 2 жыл бұрын
This is one of the best programming tutorials I've seen for quite some time. Awesome 🤓
@bazileus123
@bazileus123 2 жыл бұрын
Srbija do tokija
@karennason6593
@karennason6593 Жыл бұрын
This was so helpful! Thanks James, you demystified this topic for me.
@DmitriGoncharov
@DmitriGoncharov 3 жыл бұрын
You, sir, are a gentleman and a scholar! Thanks for posting!
@hamzahmd_
@hamzahmd_ 3 жыл бұрын
What a comprehensive explanation of asyn javascript. Great!
@artabramov2254
@artabramov2254 2 жыл бұрын
the best explanation of asynchronous abstractions ever. Thank you!
@theresasecore9372
@theresasecore9372 2 жыл бұрын
Thank you so much for this explanation - I had a lightbulb moment while watching this video and I finally get it - Thank you!
@rsdbolso8003
@rsdbolso8003 Жыл бұрын
Async / Await all the way! Amazing video, very well explained!
@CodyCleggMusic
@CodyCleggMusic 3 жыл бұрын
Personal favorite video on the subject. Thank you!
@enterflux
@enterflux Жыл бұрын
This was super helpful. All these asynchronous functions are so confusing and this was a great quick guide.
@rogermarksese3048
@rogermarksese3048 3 жыл бұрын
Thank you!!!! I now understand the concept of what you've discussed.
@ammarhassan_
@ammarhassan_ 3 жыл бұрын
Recently came across your channel via Twitter, Love ur videos.,It took me 2 yrs to understand callbacks (give and back) but it was worth it, I can now know it is working and how to create HOF.
@NivBarchechet
@NivBarchechet Жыл бұрын
the best explanation i found. thanks alot, had been struggling with this for a while..
@abderahmaneaoufi
@abderahmaneaoufi 3 жыл бұрын
Thanks this is was simple and comprehensive thank you so much i'm going to love async and await just like you ..
@everay1846
@everay1846 3 жыл бұрын
I'm so glad to hear that asynch js is not only for me difficult to learn, because it's just not sinking in, yet. I'm grateful to learn from your videos, you can explain complex things simple.
@ramyattalla7168
@ramyattalla7168 Жыл бұрын
its not SYNCING in yet* lmao i'll see myself out- I promise...
@tigana
@tigana Жыл бұрын
@@ramyattalla7168 Lol
@kinstar
@kinstar 11 ай бұрын
you really have to get lost in it a few times before something asynchronously clicks in your head
@im2godly750
@im2godly750 Жыл бұрын
Hi, I am new to JS but out of all the syntaxes I have learned from traditional to es6 and above, await async seems like easiest one to manage. In terms of updating the code and maintenance, async await is the way to go. It is more concise which makes it less prone to human error … You are a great teacher, the only thing I wasn’t familiar with in your video was the fs read only stuff… I get the gist of it, but I would like to learn more details. If you already made a vid on it I will find it your library. I am one of your newest subscribers. Thanks for the content❤
@hrzh6721
@hrzh6721 3 жыл бұрын
Very straightforward. Thanks A LOT ~~~~
@Noone-bb5qh
@Noone-bb5qh Ай бұрын
Thank you my man. This is going to help me a lot for my interview prep.
@shonendumm
@shonendumm Жыл бұрын
This was a very clear explanation, I finally understand it now after 5 years. Thank you! I wish to learn require and import next. :)
@kkbox1125
@kkbox1125 3 жыл бұрын
Very concise and informative! Love it
@pranavmahajan4190
@pranavmahajan4190 2 жыл бұрын
This helped my all doubts. thanks a ton.
@heyyyyyworld
@heyyyyyworld 3 жыл бұрын
Great explanation! Thank you!
@mattmjlg5053
@mattmjlg5053 2 жыл бұрын
I have to subscribe your content is invaluable. This is like the 5th video I’ve watched from you this week
@antonk2157
@antonk2157 2 жыл бұрын
This seems like a good syntax and concept introduction, what it lacks is actual explanation on how exactly these calls are executed, in what queue, order over time etc.
@hakanus1
@hakanus1 2 жыл бұрын
Hi James, this is one of the best concise video I have ever seen on some of the most difficult concepts in JS. Thank you very much for this.
@JamesQQuick
@JamesQQuick 2 жыл бұрын
So glad you enjoyed it!
@RobbyNeale
@RobbyNeale 2 жыл бұрын
Fantastic video. Well prepared. Succinct. Everything I could have asked for.
@user-kj7bn8ls3b
@user-kj7bn8ls3b 2 жыл бұрын
Hi! James, thank you for these video. I appreciate you describe with good examples there.
@baay81
@baay81 Жыл бұрын
Great summary. Thanks a lot!! The last version is more readable for me too. I will adopt that.
@debhasish
@debhasish Жыл бұрын
Thank you for the video, This is much much better than the 2h video on youtube about Callbacks, Promises, and Async/Await.
@MrStefanica
@MrStefanica 3 жыл бұрын
Bravo! Super explanation ! Thanks !
@soniablanche5672
@soniablanche5672 3 жыл бұрын
If you're using the fetch api I recommand checking the value of "response.ok" because code 404 (or whatever code error the pokemon api sends back) is not an error for the fetch api because the server successfully sent back a response.
@paulokehie4792
@paulokehie4792 2 жыл бұрын
hello sonia. do you have the link to the fetch api?
@YamilGonzales
@YamilGonzales 2 жыл бұрын
good suggestion, thank you. I just read about it, it makes sense
@EddieOlivas
@EddieOlivas 2 жыл бұрын
If you have this issue and it's a node or react project, try axios
@alang.2054
@alang.2054 Жыл бұрын
@@paulokehie4792 You can just literally google it
@snoopysatangore
@snoopysatangore 2 жыл бұрын
Great video, clear to the cut explanation!
@bencooper2753
@bencooper2753 3 жыл бұрын
Wow, very well put together. Very helpful.
@JohnDoe-kw3qu
@JohnDoe-kw3qu 2 жыл бұрын
very straight forward, thank you!
@derickmoncado
@derickmoncado 3 жыл бұрын
Great content man. Loved this!
@user-mo8de5hl9g
@user-mo8de5hl9g 2 жыл бұрын
Information is given in super comprehensible way. Really like tutorials like this🖥
@guymross
@guymross 3 жыл бұрын
Brilliant and concise thanks!
@luxs3
@luxs3 10 ай бұрын
What I love about your video is that you don't just explain the code based on the syntax, but you give conrete examples in which it can actually be used. This also results in a very natural example for chaining promises (getting json from a response), which makes this super easy to grasp. Thank you very much for making this! Maybe you could take a look at using async await for concurrent callbacks as well?
@Flayer.14
@Flayer.14 9 ай бұрын
I agree, the chaining promises example was top notch, loved it
@Remiisola
@Remiisola 5 ай бұрын
Gold mine for me. Thanks for making it easy to understand, thanks to all other videos that prepared my understanding to some level too .
@michaelreynoso2289
@michaelreynoso2289 2 жыл бұрын
Great explanation, thanks man!
@ashbjorn
@ashbjorn 3 жыл бұрын
First time viewer, and very interesting topics as these cover the bigger struggles I have transitioning between C# and JS whenever a project calls for it. One thing I am curious about is the combination of events and promises/async? I often find myself wanting to subscribe to an event, and then executing code from the calling page, once that event has finished. Is there a video/information that could lead me to better understand that scenario? Loving the content so far, you got yourself a sub :)
@multihrab
@multihrab 2 жыл бұрын
Great video, really helped me undertand asynchronous js.
@phoenix888media9
@phoenix888media9 10 ай бұрын
You are the best teacher so far me! very easy to understand and very good examples and explanation.
@AmaroAmaral
@AmaroAmaral Жыл бұрын
You are the BEST! Thank you!
@jonathanhammond5563
@jonathanhammond5563 3 жыл бұрын
I just finished a homework that imports inquire object then latches a prompt and a then(). I wanted to learn about async await and am going to use this video to try and rewrite the code (am learning node so may try to write parts of the code into modules as well). Thank you!
@toufexisk
@toufexisk 2 жыл бұрын
Excellent explanation! Thank you! : ' )
@nonesomeone5357
@nonesomeone5357 2 жыл бұрын
I really like your videos James, so keep doing what you're doing. Thanks for your time and effort.⌨🖥💻
@hsiang-yehhwang2625
@hsiang-yehhwang2625 2 жыл бұрын
Nice!! Thanks for sharing!!
@oleksandrploskovytskyy1520
@oleksandrploskovytskyy1520 3 жыл бұрын
Big big thanks to you James! Awesome channel!
@iiWolff
@iiWolff 2 жыл бұрын
What a vídeo! Well done mate.
@digitalmastery3736
@digitalmastery3736 2 жыл бұрын
This is amazing. Thankyou
@lukebennellick4315
@lukebennellick4315 2 жыл бұрын
Great video - nice and clear, thank you.
@alexkaufmann2923
@alexkaufmann2923 Жыл бұрын
This video was phenomenal
@Sammorris207
@Sammorris207 2 жыл бұрын
Thanks for the content it's really helpful.
@jingli9232
@jingli9232 2 жыл бұрын
extremely clear, thx so much
@miroslavmijatov547
@miroslavmijatov547 2 жыл бұрын
Great explanation! Thanks!
@Allysson635
@Allysson635 2 жыл бұрын
Great video as always! I keep wondering what it the Theme that you are using haha
@anishjoshi1999
@anishjoshi1999 2 жыл бұрын
Thank you so much. You have no idea what this means to me.
@FromRootsToRadicals
@FromRootsToRadicals Жыл бұрын
Senior dev here and browsing around. Good clean clear vids.
@fad9981
@fad9981 Жыл бұрын
Best video on JavaScript I’ve ever watched ❤
@jennacorre8084
@jennacorre8084 10 ай бұрын
Thanks for this!!
@boyanich
@boyanich 3 жыл бұрын
Nice and easy to understand, thx man!
@ANDREPEIXOTO1
@ANDREPEIXOTO1 2 жыл бұрын
Subscribed! Great content 👏👏
@kuldeeps1ngh
@kuldeeps1ngh 3 жыл бұрын
Excellent explaination of async await. Thanks
@davidolaboye5549
@davidolaboye5549 2 жыл бұрын
1M likes for this video. I love the way you implement the code using different approaches. Thanks @James.
@DesignfulDev
@DesignfulDev 3 жыл бұрын
Asynchronous Javascript was definetly the most challenging topic for me to wrap my head around. Wish I had that explanation when I was learning!
@JamesQQuick
@JamesQQuick 3 жыл бұрын
Maybe we can make it easier for the future generations lol
@chris94kennedy
@chris94kennedy 3 жыл бұрын
@@JamesQQuick For me it's OOP. I use instructive or functional programming and shy away from class based oop. Async JS is ok if you watch a few good explanations of the event loop
@ikryper
@ikryper 3 жыл бұрын
Great job explaining
@ethaneisenhard
@ethaneisenhard 3 жыл бұрын
Great video and examples James! Thanks for sharing 🥳
@JamesQQuick
@JamesQQuick 3 жыл бұрын
Thanks for watching. Glad you enjoyed it :)
@Hyuts
@Hyuts Жыл бұрын
Second most confusing to Neural Nets to me. Thank you so much for the succinct explanation!
@amroabdulvahit9517
@amroabdulvahit9517 Жыл бұрын
Thanks a lot, it helped me understand very well though I still have some struggle with promises
@davidtillery6250
@davidtillery6250 2 жыл бұрын
Thank you! wery helpful:)
@Riyaz__
@Riyaz__ 9 ай бұрын
This is the best explanation about the topic. Every other video only post setTimeout example. So i always wondered "what about other scenarios?". Now i understand this concept. Thank you very much.
@JamesQQuick
@JamesQQuick 8 ай бұрын
That's amazing to hear!!
@nemtomism
@nemtomism 2 жыл бұрын
Good job! Thank you from Hungary!
@sokoyaadedolapo5321
@sokoyaadedolapo5321 3 жыл бұрын
I also like using async and await, when I first started it was promises then I started working with this developer who told me to always use async and await since then have been hooked if am writing any JS async and await will surely appear
@fredguth1315
@fredguth1315 Жыл бұрын
I like to watch your videos even when I already know the subject. I differ on you on the fact that I use callbacks a lot and I am always worried that by using await I am making my code slower, but the truth is that code readability is for most of the time much more important than a few imperceptible milliseconds here and there.
@andreroydev
@andreroydev 3 жыл бұрын
I can see clearly now!!! 🎶 Thanks a LOT James! 😉
@JamesQQuick
@JamesQQuick 3 жыл бұрын
Hahah now I’ve got that song stuck in my head!
@andreroydev
@andreroydev 3 жыл бұрын
@@JamesQQuick Gotcha! 🤣
@Dadaadad268
@Dadaadad268 Жыл бұрын
Thanks, that helped a lot!
@backtoGodhead0
@backtoGodhead0 3 жыл бұрын
Nice video James, a clarification - await keyword do the functionality of .then we use in resolve and reject way of handling a promise but rather it gives us access to the incoming response.
@jsonchicas
@jsonchicas 3 жыл бұрын
Thanks for the good content :), I just have a question, in your opinion what is the benefit to use Async await instead of promises? is it just readability? Thanks again :)
@ranjanrnj6864
@ranjanrnj6864 3 жыл бұрын
Good video JQQ, can you please make a video separately for nested promises alone, that'll be really a thankful one
@abo1428
@abo1428 Жыл бұрын
When it comes to performance and optimization, try-catch blocks require more resources than simple "if x==null" blocks. It also makes the code more readable if you check for null first, and in this case you exit directly from the method.
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
Каха с волосами
01:00
К-Media
Рет қаралды 5 МЛН
Don’t take steroids ! 🙏🙏
00:16
Tibo InShape
Рет қаралды 20 МЛН
Tips For Using Async/Await in JavaScript
16:26
James Q Quick
Рет қаралды 394 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3 МЛН
Mastering async code with Typescript and Javascript
39:01
Jack Herrington
Рет қаралды 76 М.
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
JavaScript Event Loop: How it Works and Why it Matters in 5 Minutes
7:20
Javascript Promises vs Async Await EXPLAINED (in 5 minutes)
5:50
Roberts Dev Talk
Рет қаралды 526 М.
Callbacks in JavaScript Explained!
14:03
Code with Ania Kubów
Рет қаралды 148 М.
Whats the Difference Between Callbacks and Promises?
8:39
Coding With Chaim
Рет қаралды 15 М.
Understanding Ownership in Rust
25:31
Let's Get Rusty
Рет қаралды 233 М.
Каха с волосами
01:00
К-Media
Рет қаралды 5 МЛН