Async Await vs. Promises - JavaScript Tutorial for beginners

  Рет қаралды 61,832

ColorCode

ColorCode

Күн бұрын

JavaScript Async Await, how to use them with Promises, and more importantly why?! This is episode 13 of 20 things Javascript Developers Should Know But Probably Don't.
00:00:00 Intro
00:01:04 How Promises work
00:02:18 Await!
00:04:00 Async!
00:05:55 Async/Await vs. then block
00:07:12 Real example with fetch()
00:10:58 6 important points about Async/Await
00:14:20 Error Handling with try/catch
00:20:49 Final thoughts on Async/Await
00:21:22 20,000!
00:21:45 ColorCode Podcast
00:22:22 ColorCode Merchandise Store 👕
00:22:38 New website
00:22:59 KZbin Shorts
00:23:12 Update on JS Mastery Course
Links mentioned in the video:
ColorCode Etsy Merchandise store:
www.etsy.com/shop/ColorCodeSt...
Episode 11: Asynchronous JavaScript:
• Async JavaScript & Cal...
Episode 12: JavaScript Promises:
• JavaScript Promises -...
JavaScript Promises in 1 Minute:
• JavaScript Promises 👨🏻...
Using Await without Async in JS Modules (MDN):
developer.mozilla.org/en-US/d...
Full playlist here: • 20 Things JavaScript D...
JavaScript Promises from the series "20 Things JS Developers Should Know but Probably Don't"
by ColorCode.io, Sina Jazayeri
** Announcement **
Full JavaScript Mastery course is coming! Details at the end of the video. Sign up for Early Access here:
www.colorcode.io/js-mastery

Пікірлер: 293
@ColorCodeio
@ColorCodeio Жыл бұрын
Async Await 🧑🏻‍💻 Episode 13 of 20 Things JavaScript Developers Should Know but Probably Don't
@rishavmehra9437
@rishavmehra9437 Жыл бұрын
go for it
@Justnadeem
@Justnadeem Жыл бұрын
WHICH IDE DO YOU USE
@rishavmehra9437
@rishavmehra9437 Жыл бұрын
@@Justnadeem bhai guitar sikkha da 😅
@c3cris2
@c3cris2 6 ай бұрын
What tool are you using for isntant console feedback ?
@jl_117
@jl_117 3 ай бұрын
this video saved me in an interview. I was asked to explain async/await code and remembered what this video taught me
@ColorCodeio
@ColorCodeio 4 күн бұрын
Love it!
@fengzheng7344
@fengzheng7344 Жыл бұрын
I would suggest that you release "Javascript Mastery" course NOW! As a student, I don't need to go over your entire "Javascript Mastery" course. I just need to watch some of the videos on topics that I am struggling with, so just show us what you have, and charge us, students, on a subscription basis.
@user-kn4oi9oh4i
@user-kn4oi9oh4i Ай бұрын
I am so afraid of this topic, but after you taught it, I finally got how it works. Thanks good sir! By the way, that coffee is the cherry on top of this video ❤
@ColorCodeio
@ColorCodeio Ай бұрын
Excellent!
@thibaultdeverge7601
@thibaultdeverge7601 21 күн бұрын
I know is a bad practice but didn't even bother put a catch block on your video, i'm 100% sure the promised of good content will be fullfilled even before watching it :D ! Thank you for your work for the community !
@serapheogen
@serapheogen Ай бұрын
I thought Brad Traversy was my favorite instructor on KZbin, and I do love his work but I can't wait for your JS course. You don't miss a single step/detail out and that's invaluable. No need to jump around video to video to find a crucial missing piece of information that was missed from a video which got me 80% the way there but not 100%.
@ColorCodeio
@ColorCodeio Ай бұрын
Glad to hear it! 🙏
@serapheogen
@serapheogen Ай бұрын
@@ColorCodeio Do you have an idea yet of when it’s scheduled to release?
@abdullah-ayyash
@abdullah-ayyash 6 ай бұрын
This is by far the best Javascript tutorial in my opinion. I did watch JS tutorials on over 100 different channels and couldn't find any explanation that can compete with your explanation so thank you for the great content. You deserve millions of subscribers.
@ColorCodeio
@ColorCodeio 6 ай бұрын
Thank you!
@taeyangyoo1941
@taeyangyoo1941 Жыл бұрын
Thank you for sharing this tutorial! I got this concept of Javascript more clearly! Hope you keep going this work!! 🌞
@VaradNarvekar
@VaradNarvekar Жыл бұрын
I cant be more thankful to you for providing such quality content !! I have never come across any person before who can explain things in sucha smooth wayyyy !! 2023 gonna be a wonderful year !!
@ColorCodeio
@ColorCodeio Жыл бұрын
Thank you!
@IkeVictor
@IkeVictor Жыл бұрын
love the quality content....keep it up!
@kmisdone
@kmisdone 8 ай бұрын
My favorite place to learn about coding. Thanks for these amazing videos.
@matickovac
@matickovac Жыл бұрын
Amazing explanation. Thanks so much! Can't wait for the next episode - would love to see tutorials even.
@ColorCodeio
@ColorCodeio Жыл бұрын
🙏
@youngfinancejourney
@youngfinancejourney 8 ай бұрын
Your delivery is a masterpiece, you make learning so fun. Thank you so much
@ColorCodeio
@ColorCodeio 8 ай бұрын
Thank you Kevin!
@SuPern0vA72
@SuPern0vA72 7 ай бұрын
Love your teaching style, thank you for providing high quality lessons/content 🙏🏻
@ColorCodeio
@ColorCodeio 7 ай бұрын
My pleasure!
@jatilyadav4000
@jatilyadav4000 Жыл бұрын
Absolute genius....Your way of explaining is just the best on Yt
@MohamedAhmed-tt2nz
@MohamedAhmed-tt2nz Жыл бұрын
20 episodes might not be enough, great work again !!
@ColorCodeio
@ColorCodeio Жыл бұрын
Ok 100
@ShantanuSingh-nu7kv
@ShantanuSingh-nu7kv Ай бұрын
@@ColorCodeio yes yes yes dear sir yes
@bmehder
@bmehder Жыл бұрын
Glad to see more videos in this series. It's been a while. I blame Craig.
@ColorCodeio
@ColorCodeio Жыл бұрын
F*ckin Craig
@tetianazhuchenko2182
@tetianazhuchenko2182 Жыл бұрын
That is the perfect study materials that you're doing. I've never seen something better. Thanks a lot for your job!
@ColorCodeio
@ColorCodeio Жыл бұрын
Glad you enjoy it!
@poonamkhatri2782
@poonamkhatri2782 Жыл бұрын
Keep coming with these videos...😍
@mickeymacke1780
@mickeymacke1780 Жыл бұрын
nearly at 22k a few days into the New Year. Congrats and THANK YOU for such great content.
@ColorCodeio
@ColorCodeio Жыл бұрын
Thanks Mickey
@UnifiedFriends
@UnifiedFriends Жыл бұрын
Long awaited, finally allSettled && fulfilled.
@user-jd6te1ss7u
@user-jd6te1ss7u 6 ай бұрын
Thank you very much for a detailed and visually engaging explaination in terms of the animated code on the screen, the montage, and the way you're explaining the topic yourself. I am watching your js async related videos currently and making notes and actually comprehending this not so easy to grasp topic thanks to the way you present your explaination. This is quite a work to put all these pieces together that would result in such a high-quality content. Admire your work and time you put into it, thank you 🙂
@vasudev16180
@vasudev16180 Жыл бұрын
I can't wait for more content brother. Keep going.👍
@ColorCodeio
@ColorCodeio Жыл бұрын
More to come!
@jpsingh1187
@jpsingh1187 Жыл бұрын
Really liked the way you make others understand the concepts,repetition is the key.
@ColorCodeio
@ColorCodeio Жыл бұрын
Thank you
@JoshIbbotson
@JoshIbbotson Жыл бұрын
Honestly i've been learning for just over a year now and I come to your videos when i'm confused with a concept and need to sit down and understand it. I genuinely appreciate your videos and I hope you keep going long into my future career.
@ColorCodeio
@ColorCodeio Жыл бұрын
Thanks Josh
@simonshurety3870
@simonshurety3870 Жыл бұрын
Joshy lad, fancy seeing you here! Did I share ColorCode with you or did you share it with me?
@chetansingh575
@chetansingh575 4 ай бұрын
Please continue this series is dope.
@ColorCodeio
@ColorCodeio 4 ай бұрын
For sure
@RadoslavPhanVan
@RadoslavPhanVan Жыл бұрын
Your way of explaining is something else (in a good way). I couldn't wrap my head around this topic but after watching this video it's piece of cake. Thank you
@ColorCodeio
@ColorCodeio Жыл бұрын
Glad it helped!
@oneaboveall7489
@oneaboveall7489 Жыл бұрын
Thank You Very Much For giving smooth explanation for holy content.... awesome video.
@saferforenvironment5850
@saferforenvironment5850 6 ай бұрын
Thankyou for this detailed yet follow along video Long live from Nepal 🇳🇵
@steelmantv
@steelmantv Жыл бұрын
Love your channel! Thanks 👹
@orrodrigez5051
@orrodrigez5051 Жыл бұрын
thank you for quality content. watching this 2 month later your subscribers almost doubled itself! for a good reason! you gonna have to continue this to a 30 parts series :D
@ColorCodeio
@ColorCodeio Жыл бұрын
haha maybe, thanks for the sub 🤘
@nagendradevara1
@nagendradevara1 Жыл бұрын
Please keep us this phase of decluttering JavaScript concepts.
@codie12
@codie12 Жыл бұрын
Nice explanation!!!
@user-oz3xy9th3u
@user-oz3xy9th3u 6 ай бұрын
the way you explain things in such an easy and well- structured way is honestly admirable, i was a bit lost and you helped clarify all the ambiguities i had
@ColorCodeio
@ColorCodeio 6 ай бұрын
Thank you!
@ritikaphirani7753
@ritikaphirani7753 Жыл бұрын
Much awaited video. Can you please make projects too on js and nodejs?
@puyakhalili
@puyakhalili 2 ай бұрын
Incredible video. Thank you
@ColorCodeio
@ColorCodeio 2 ай бұрын
Thank you!
@abdohatemeldosoky
@abdohatemeldosoky Жыл бұрын
Congratulations on +30k subscribers ❤
@ColorCodeio
@ColorCodeio Жыл бұрын
Thank you
@Leesdjo
@Leesdjo 4 ай бұрын
One thing special about this 20 video series is that you helped most of us in advanced for what we will soon encounter as we move on to take the software developer role in the future. Thank you. Your effort means a lot to me.
@ColorCodeio
@ColorCodeio 4 ай бұрын
Glad to hear that
@msunrl8577
@msunrl8577 Жыл бұрын
just found your channel, very nice and clear tutorials! thanks
@ColorCodeio
@ColorCodeio Жыл бұрын
Awesome, thank you!
@sfspmusic
@sfspmusic 8 ай бұрын
Amasing content! Really, thank you, sir, for making this world better with your videos! BTW, how about some Angular videos if it's possible?
@iambrijeshtoo
@iambrijeshtoo 11 ай бұрын
Thank you ❤
@amarayassmine
@amarayassmine 7 ай бұрын
you are legend man you helped me
@ColorCodeio
@ColorCodeio 7 ай бұрын
Glad to hear it!
@steelmantv
@steelmantv Жыл бұрын
Hey man, just discovered your channel while cramming for a job interview next week. Thanks for the succinct explanations and dope style. Keep it up.
@ColorCodeio
@ColorCodeio Жыл бұрын
How did your interview go?
@arthurbulat9532
@arthurbulat9532 Жыл бұрын
dude, you are doing amazing stuff! thank you and keep going please)
@ColorCodeio
@ColorCodeio Жыл бұрын
Thank you. More to come soon.
@zahrabt6705
@zahrabt6705 3 ай бұрын
when is the podcast ready? can't wait for that! you're an excellent teacher btw keep going
@mg-sp5ou
@mg-sp5ou 7 ай бұрын
Thank you so much for your valuable lessons
@ColorCodeio
@ColorCodeio 7 ай бұрын
You're welcome!
@faizadnan4029
@faizadnan4029 7 ай бұрын
Great Lesson
@ColorCodeio
@ColorCodeio 7 ай бұрын
Ty!
@decentrob8126
@decentrob8126 Жыл бұрын
Just subbed, watched some of your videos and your are really good att explaining!
@ColorCodeio
@ColorCodeio Жыл бұрын
Welcome aboard!
@AlisaHaman
@AlisaHaman Жыл бұрын
So good you might as well make it a 30 part series 😉
@jeevachaithanyansivanandan
@jeevachaithanyansivanandan Жыл бұрын
Apart from all the technical side, I love the positive vibe this video delivers! Coding should be fun and enjoyable, very informative video and subscribed. I shall wait for your JS full course as well.
@ColorCodeio
@ColorCodeio Жыл бұрын
Much appreciated! 🙏
@prateekkukreja6576
@prateekkukreja6576 Жыл бұрын
Hey Sina! I just wanted to give you a shoutout and let you know how much I've been enjoying your JavaScript tutorial videos on KZbin! Seriously, you make learning JavaScript so much more fun and less intimidating than it would be otherwise. I've struggled to wrap my head around some of these concepts before, but you explain everything in a way that's easy to understand and not at all boring. Plus, you inject some personality and humor into your videos, which makes them even more enjoyable to watch. Keep up the fantastic work, and looking forward to seeing more awesome videos from you! Cheers.
@ColorCodeio
@ColorCodeio Жыл бұрын
Thanks for taking the time to write. Glad to hear all of the above. More videos coming soon.
@PatrikRasch
@PatrikRasch Жыл бұрын
I know these must take a ton of time, but please never stop 😂. These are super helpful and genuinely deserve a lot more views. I'm going through The Odin Project to get into webdev and your videos are both entertaining and educational.
@ColorCodeio
@ColorCodeio Жыл бұрын
Thanks Patrik. Good to see you here.
@damianaruj3846
@damianaruj3846 Жыл бұрын
Dude ur awesome!! Thanks for sharing ur knowledge
@ColorCodeio
@ColorCodeio Жыл бұрын
👍
@user-nl8wi2cg9x
@user-nl8wi2cg9x 4 ай бұрын
Superb Content, you are Awesome.
@Salah-YT
@Salah-YT Жыл бұрын
glad to see u again bro and Happy New Year 2023 so keep it up good work with JavaScript thx
@ColorCodeio
@ColorCodeio Жыл бұрын
Thanks dude!
@user-kt5id2vq7g
@user-kt5id2vq7g 6 ай бұрын
you are a great guy🙏🙏
@AberrahimCoder
@AberrahimCoder Жыл бұрын
your way of teaching are top tier furthermore impressive
@pullrequest1481
@pullrequest1481 Жыл бұрын
HELL YEAH!!! 💪🏽💪🏽💪🏽
@ishankatoch7245
@ishankatoch7245 3 ай бұрын
Really appreciate you putting these videos . These are really the best tutorial and is helping alot also can you please mention the actual date of the course you gonna launch?
@user-mw5bm2xh9x
@user-mw5bm2xh9x 6 ай бұрын
thanks for the tips.
@ColorCodeio
@ColorCodeio 4 ай бұрын
You’re welcome
@nikolanovakovic4150
@nikolanovakovic4150 Жыл бұрын
thank you senpai ^^
@frontenddeveloper9173
@frontenddeveloper9173 Жыл бұрын
Great videos 👍
@TheCinematicTola
@TheCinematicTola Жыл бұрын
Love you explanation
@ColorCodeio
@ColorCodeio 11 ай бұрын
I’m glad
@sashaikevich
@sashaikevich Жыл бұрын
Great tuts!
@ColorCodeio
@ColorCodeio Жыл бұрын
🙏
@sashaikevich
@sashaikevich Жыл бұрын
@@ColorCodeio for a bit more feedback, I particularly found it useful how you made the connection of between the next, catch functions and the resolve reject. Also, didn't know that I could have an error as the second parameter in next. Really thorough deep-dives, thank you!
@JeetKRamnani
@JeetKRamnani Жыл бұрын
You are amazing men ❤️
@lloydchan9606
@lloydchan9606 Жыл бұрын
underrated channel really, thanks for the goods
@ColorCodeio
@ColorCodeio Жыл бұрын
🙏
@user-sw3oz1hr8q
@user-sw3oz1hr8q 14 күн бұрын
Audio Code... best name ever for your pod cast
@12345678uygfcxdrtghn
@12345678uygfcxdrtghn Жыл бұрын
Nice video! Although I have to mention something. As per ES22, they introduced Top-Level Await, so you can use Await outside an Async function. Please correct me if I am wrong!
@meryemk.4884
@meryemk.4884 8 ай бұрын
Hearing Qoli's name kept taking my by surprise and made me smile a few times ahahah Great lesson!
@darshanpandya1087
@darshanpandya1087 Жыл бұрын
your presentation of the topic so nice that i don't have to write it down and go to another site for clarifications and i liked it very much. Thank You > 3 : )
@ColorCodeio
@ColorCodeio Жыл бұрын
👍
@jasminelucas2842
@jasminelucas2842 Жыл бұрын
Thank you dear, you are the best.😘
@ColorCodeio
@ColorCodeio Жыл бұрын
You're welcome
@alirezsoltaan
@alirezsoltaan 5 ай бұрын
Sina dadash damet Garm. First time I heard about asynchronous JavaScript coding was about 4 years ago and I did never completely understood how to use async, await, promise and then blocks until I watched your videos. Good F**** Job.
@ColorCodeio
@ColorCodeio 4 ай бұрын
Merci
@bilalbeny4172
@bilalbeny4172 6 ай бұрын
thank yo so much, your are the best
@ColorCodeio
@ColorCodeio 4 ай бұрын
🙏🙏
@kyleh1623
@kyleh1623 2 ай бұрын
tbh, this series deserves millions of views for all the devs out there who want to sort such js concepts out
@hao12654
@hao12654 Жыл бұрын
I would say it's 13 out of 10 for this video. great content. look forward to next episode.
@ColorCodeio
@ColorCodeio Жыл бұрын
Thanks!
@lakshithamadhu
@lakshithamadhu 4 ай бұрын
Great Work ♥♥♥♥
@ColorCodeio
@ColorCodeio 4 ай бұрын
Thanks 🔥
@techbro3085
@techbro3085 Жыл бұрын
Finally completed the series. waiting for new video.
@sarthakgiri4596
@sarthakgiri4596 2 ай бұрын
This video deserves huge views and channel deserves million subscribers
@ColorCodeio
@ColorCodeio 2 ай бұрын
Soon
@ashishkumarsahoo6966
@ashishkumarsahoo6966 Жыл бұрын
This is highest level quality content u are creating I have seen in KZbin much respect love from India please make more videos on JS absolutely loving it it's more interesting even I have skipped my fab webseries to watch these masterpiece ❤
@ColorCodeio
@ColorCodeio Жыл бұрын
Thank you so much 😀
@sagarbharati1438
@sagarbharati1438 Жыл бұрын
Billion subscribers will be here one day. What a quality ❤️
@maenam4520
@maenam4520 2 ай бұрын
عشت ياكبير
@lostone390
@lostone390 5 ай бұрын
Спасибо за ролики. отличная подача и все понятно 😀
@catherinelization
@catherinelization Жыл бұрын
Always support🎉useful channel!
@ColorCodeio
@ColorCodeio Жыл бұрын
🙏
@LoneDWispOfficial
@LoneDWispOfficial Жыл бұрын
Will be interesting a discussion about namespaces, in general, not just the namespace of typescript or Javascript. I didn't find any common dominant opinion in the community, and is being hard to find topics talking about it, if it's a bad practice, or a good one, if you can abuse or not, etc. In my opinion i love to put functions inside namespaces on my personal projects.
@struggler4448
@struggler4448 5 күн бұрын
thanks man
@namankeshari7332
@namankeshari7332 9 ай бұрын
Crazyyy! This guy is super sleek and cool. Feel like I'm watching Netflix while watching your videos sir! Super cool!!
@ColorCodeio
@ColorCodeio 9 ай бұрын
Thanks!
@nordicnomad5473
@nordicnomad5473 Жыл бұрын
Thanks a lot for the detailed information about async/await. I was struggling for a week to understand using fetch inside a loop. Now I know how to use the async/await .. if it is possible, please create a short video about using async/await inside a loop , Thanks and subscribed !
@ColorCodeio
@ColorCodeio Жыл бұрын
Good idea. I'll make it.
@papsotos
@papsotos Жыл бұрын
Woah, was there a Tool reference in this 46 & 2 part? Great video!
@ColorCodeio
@ColorCodeio Жыл бұрын
Nice catch! Good ear 😉
@rocialcala
@rocialcala 7 ай бұрын
Pleasee error handling will be so helpfull!!!!!!!!!
@oleksandrfomin326
@oleksandrfomin326 Жыл бұрын
Very quality content! It'd great if you could show how async/await works under the hood
@alex_blue5802
@alex_blue5802 10 ай бұрын
I'm curious about this as well. How does resolve get set? When an async function returns a promise, how does the caller handle that?
@awaismohsin345
@awaismohsin345 Жыл бұрын
First Comment 👍👍👍 I was waiting for a long time, Thank You Boss,
@ColorCodeio
@ColorCodeio Жыл бұрын
🤝
@FarazBeg
@FarazBeg 7 ай бұрын
I didn't know Stanley Tucci knew JS so well... thanks for the content..
@ColorCodeio
@ColorCodeio 7 ай бұрын
🍝
@user-op3co9di8i
@user-op3co9di8i 3 ай бұрын
Your videos are amazing. I'm watching 3d in a row. Now async code is not a mess for me. Huge thank you. Also throughout all these videos I was wondering what ide are you using?
@ColorCodeio
@ColorCodeio 3 ай бұрын
Chrome DevTools and RunJS: runjs.app/colorcode
@matthewmaloneydev
@matthewmaloneydev Жыл бұрын
hi there, new to coding, and your videos have been tremendously helpful!! Quick question for you, what code editor are you using and how are you able to have the live javascript running on the right of it? that seems super helpful!
@ColorCodeio
@ColorCodeio Жыл бұрын
RunJS: runjs.app/?via=colorcode
@moryaffe7595
@moryaffe7595 2 ай бұрын
46&2 ״just ahead of me” ☺️
@ColorCodeio
@ColorCodeio 2 ай бұрын
🤘🏼
@mashmixture5662
@mashmixture5662 Жыл бұрын
Very Very very quality content here. You are my love siiiina
@ColorCodeio
@ColorCodeio Жыл бұрын
♥️
@mashmixture5662
@mashmixture5662 Жыл бұрын
What about React
@andrewfurnevel7726
@andrewfurnevel7726 10 ай бұрын
Love your tutorials. What are javascript editor / REPL are you using for your videos. It's very cool.
@ColorCodeio
@ColorCodeio 9 ай бұрын
runjs.app/colorcode
@andrewfurnevel7726
@andrewfurnevel7726 9 ай бұрын
@@ColorCodeio Thanks. Very much appreciated.
@dineshreddy8915
@dineshreddy8915 Жыл бұрын
Its Perfect every thing is perfect
@ColorCodeio
@ColorCodeio Жыл бұрын
🤘
@tusharacharekar2727
@tusharacharekar2727 8 ай бұрын
⭐⭐⭐⭐⭐ for Quality, Explanation, Presentation.
@medmolay8627
@medmolay8627 3 ай бұрын
maaan , i know i'am a bit late ,but i fuckin love you man , this playlist is the best thing that ever happened to me. it was realy helpful . (plus the qoli thing is really funny😭😭😭😭😭😭😭😭 )
Fetch API - JavaScript Tutorial for beginners
30:50
ColorCode
Рет қаралды 85 М.
JavaScript Promises  -- Tutorial for Beginners
37:05
ColorCode
Рет қаралды 100 М.
Лизка заплакала смотря видео котиков🙀😭
00:33
Суд над Бишимбаевым. 2 мая | ОНЛАЙН
7:14:30
AKIpress news
Рет қаралды 676 М.
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 53 МЛН
async await | Namaste JavaScript - Season 02 - Ep 04
1:09:21
Akshay Saini
Рет қаралды 209 М.
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
Every CSS Animation property
9:26
chunkydotdev
Рет қаралды 39 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
The Async Await Episode I Promised
12:04
Fireship
Рет қаралды 1,1 МЛН
Callbacks in JavaScript Explained!
14:03
Code with Ania Kubów
Рет қаралды 148 М.
Inheritance in JavaScript - Prototypal Inheritance tutorial
20:06
i cant stop thinking about this bug
8:40
Low Level Learning
Рет қаралды 20 М.