Asynchronous Vs Synchronous Programming

  Рет қаралды 260,805

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Asynchronous code can be incredibly confusing and frustrating for anyone learning programming. In this video I will explain what asynchronous and synchronous code talk about their differences through the use of multiple examples.
Twitter:
/ devsimplified
GitHub:
github.com/WebDevSimplified
CodePen:
codepen.io/WebDevSimplified
#JavaScript #WebDevelopment #Programming

Пікірлер: 235
@nathalierautell5259
@nathalierautell5259 4 жыл бұрын
I love that you are straight to the point with a clear and short explanation. It makes things a lot easier. Appreciated! 🤩
@vegeta4614
@vegeta4614 2 жыл бұрын
u just want him to blow your back out
@gokulnaathb2627
@gokulnaathb2627 2 жыл бұрын
Yes😀
@srikanthathikari9995
@srikanthathikari9995 3 жыл бұрын
100% crystal clear explanation. I was looking at videos that are lengthy, I could not get my head around them. Really liked the way you explained async with then example. Thanks tons.
@SiRexable
@SiRexable Жыл бұрын
Nice explanation, but just to add even if you put setTimeOut 0ms it will still excecute last after all synchronus code is done and stack is empty. Thats because async funtions appear on the stack at call time and are immediately pushed off and added to webapis stack where count down begins and since its 0 so the callback of setTimeout gets immediately it gets pushed to task queue ( not call stack ), where spinning event loop is gonna pop this callback function on the main stack once its empty. So even if you have 5 set time outs with 0 ms and 1 console log at the end set timeouts gonna run after console.log because as i mentioned above async functions are pushed back on stack only after main stack is empty
@thucle4122
@thucle4122 Жыл бұрын
lucid explanation, thanks man
@richardwalters9249
@richardwalters9249 3 жыл бұрын
seems that, if you get things confused, you can replace synchronous with the word "sequential"execution ... and asynchronous with "parallel" execution. Which type blocks will also become clear as well.
@GerardBeaubrun
@GerardBeaubrun Жыл бұрын
My good sir, that's such a great way to summarize it
@JasonEdokpa
@JasonEdokpa Жыл бұрын
@@GerardBeaubrun Not quite. JavaScript isn't parallel as it is runs as a single threaded process. For asynchronous functions is uses an event loop.
@abdelalimchicha7189
@abdelalimchicha7189 Жыл бұрын
@@JasonEdokpa exactly
@rl6382
@rl6382 Жыл бұрын
​@@JasonEdokpa smart man
@saritadas7716
@saritadas7716 4 жыл бұрын
every single video from your channel clears so many concepts in my head, i cant even start to tell you..thank you so much from the core of my heart
@billynovrando9383
@billynovrando9383 4 жыл бұрын
"Not every single function that takes an argument is asynchronous, but in general, most function that takes function argument are going to be asynchronous" Thank you, this line clears things for me. Much appreciated
@jthomasaurus
@jthomasaurus 4 жыл бұрын
Always a great resource for me, short and full of relevant info. Plus I like the clicky keyboard sounds. Awesome video, yet again! Thanks, Kyle!
@raaghavendrahm4883
@raaghavendrahm4883 2 жыл бұрын
I totally agree. Especially the clicky keyboard part!
@queenscript
@queenscript 3 жыл бұрын
Wow, as someone who feels more intermediate than total beginner, I felt that you really validated my learning curve. Thank you!
@luisacavalcanti3665
@luisacavalcanti3665 2 жыл бұрын
Keep it simple and objective just as you are. You clarify the web dev in a way its much easier to learn. For a non native english speaker, your chanel is one of my favorite learning resource. Thank you very much and my best reggards from Brazil. (:
@adarshnayak6803
@adarshnayak6803 2 жыл бұрын
Your videos are straight to the point and that just amazing. Thank you for making them.
@thulaparks2848
@thulaparks2848 3 жыл бұрын
Love all of your videos! You make everything so easy to understand! Thank you!!
@shanibburney8290
@shanibburney8290 3 жыл бұрын
Thanks alot. I have learned promises callbacks and async await but still I was confused between async and sync terms. Your example completely cleared all concepts async JS.
@jarryingnaut
@jarryingnaut 4 жыл бұрын
You have explained the concept so well! Thank you : )
@garyclayton6955
@garyclayton6955 Жыл бұрын
Thank you for getting to the point, and explaining this concept in clearest possible terms.
@kimkim-bm8he
@kimkim-bm8he Жыл бұрын
you are the best youtube web dev creator. Love the show. My tip is that instead of having to type console.log() each time. Just type log and vscode will auto complete the code for you. THanks for the video
@hozay6552
@hozay6552 5 жыл бұрын
Short and helpful, thank you very much! =]
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
You're welcome!
@evergreen7781
@evergreen7781 2 жыл бұрын
I am a big big fan of your short & crisp concept clearing videos 🧡🧡🧡
@PlayinWithGhosts
@PlayinWithGhosts 3 жыл бұрын
Such a simple and effective way to explain this. 🤙🏻🖤
@juanandrescastillofuenmayo6619
@juanandrescastillofuenmayo6619 3 жыл бұрын
Killer explanation, you made some stuff clearer for me in no time.
@BadalKumar-pi7ud
@BadalKumar-pi7ud 2 жыл бұрын
Spot On. The way you explained everything so easily. it is appreciable.
@pds7890
@pds7890 4 жыл бұрын
I searched and searched, nothing helped me...and on top of that, those things made me confused :(, but you just made it soo easy for me!!!! Thank you! subbed!
@parmeetsingh6981
@parmeetsingh6981 4 жыл бұрын
Thanks, your clear explanation helped me understand this concept better. :)
@MauriceLacerda0
@MauriceLacerda0 4 жыл бұрын
This was very helpful Kyle, thank you!
@technosoid2821
@technosoid2821 3 жыл бұрын
Thank you so much, This tutorial helped me a lot to get the concept clear.
@hasithasubhashana9606
@hasithasubhashana9606 Жыл бұрын
Whaaat, didnot know of this before your video. Thank you very much for sharing this
@contentsofjoy
@contentsofjoy Жыл бұрын
Wow very straight to the point.... Awesome! Double thumbs up
@johansymg
@johansymg 2 жыл бұрын
Awesome! Thanks for this video.. You have explained the concepts very well
@AmitKumar-ix3kq
@AmitKumar-ix3kq 3 жыл бұрын
Simple , Short , Concise. Thank You.
@abcdefg2981
@abcdefg2981 Жыл бұрын
the best explaination of the async feature in js ever
@camilaaguileras7672
@camilaaguileras7672 3 жыл бұрын
It took me watching 4 videos until I found this one. It was perfect!
@soniachh123
@soniachh123 3 жыл бұрын
pretty clear and straightforward explanation ..... Thanks !!
@Ari-pq4db
@Ari-pq4db 4 ай бұрын
Thank You sir , You have cleared the doubts that were blowing my head ❤
@muhammadjunaid3684
@muhammadjunaid3684 2 жыл бұрын
Dude, you just gave the best start to learn more about Async Programming. btw, whats your VS code theme, font, setup...
@mike_vahemoubayed8099
@mike_vahemoubayed8099 3 жыл бұрын
Wooooow I couldn’t understand the difference between synchronous and asynchronous code until a I watched his video thank you!
@lholhofox
@lholhofox Жыл бұрын
thank you brother!! very well explained!! keep it coming!!
@divyanshukumar813
@divyanshukumar813 2 жыл бұрын
Nice explanation. Simple and clear!!
@ForDreams14
@ForDreams14 Жыл бұрын
Thank you ! Learned a lot in just 7 minutes !
@rohitkudalkar92
@rohitkudalkar92 5 жыл бұрын
thanks, bro you have clear this concept abut sync and async with nice example
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm glad I could help
@mosesegboh
@mosesegboh 11 ай бұрын
The best in explaining stuff.......big ups man
@koluboyinavaraprasad32
@koluboyinavaraprasad32 4 жыл бұрын
I love your keyboard sound whenever you typed which makes me motivated.
@Pareshbpatel
@Pareshbpatel 2 жыл бұрын
Short, clear video on Async Programming. Thanks. {2021-07-20}
@alexandercuartas830
@alexandercuartas830 4 жыл бұрын
Thanks a lot, I really tapped into the concept
@sajjadabouei6721
@sajjadabouei6721 Жыл бұрын
very clear explanation, good examples thank you man 👌👌👌
@rajeshrathore3751
@rajeshrathore3751 5 жыл бұрын
Thank you it's really helpful for me.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
You're welcome!
@harshgupta2283
@harshgupta2283 3 жыл бұрын
excellent video mate! Really helpful!
@anilsuyal
@anilsuyal 7 ай бұрын
Thanks sir. It was really simple explanation!
@luisvaldez9545
@luisvaldez9545 3 жыл бұрын
Great video man! You helped a lot.
@solomon2291
@solomon2291 3 жыл бұрын
Thank you man ! That was very helpful
@Sachinkry
@Sachinkry 2 жыл бұрын
Explained wonderfully 🙏
@useruser-bv1ej
@useruser-bv1ej 3 жыл бұрын
Thanks, The first video that helped me!
@sidlife365
@sidlife365 3 жыл бұрын
Well explained! Best I have seen.
@hembhagat742
@hembhagat742 3 жыл бұрын
Very good explanation of the concept.
@kakao3088
@kakao3088 3 жыл бұрын
Thanks for the video, i can get more understanding about async js 👍
@johnrafaellim3200
@johnrafaellim3200 3 жыл бұрын
Very straightforward explanation thank you and godbless you.
@mitch7w
@mitch7w 3 жыл бұрын
Thank you! This makes a lot of sense
@gokulnaathb2627
@gokulnaathb2627 2 жыл бұрын
Thank you so much, this was helpful
@abderahmaneaoufi
@abderahmaneaoufi 3 жыл бұрын
Thank you i love the way you explain things .
@yasharkavoosian5169
@yasharkavoosian5169 3 жыл бұрын
Thanks I got a clear understanding about asynchronous programing :-)
@asimadam6224
@asimadam6224 2 жыл бұрын
Very straightforward I wonder why they're not just teaching like that in schools
@ritikpal9835
@ritikpal9835 3 жыл бұрын
Thank you very much it was concise and helpful
@MrBabadude
@MrBabadude 2 жыл бұрын
Thank you. Good video, very clear.
@himbary
@himbary 4 жыл бұрын
Love your newsletter
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Thank you!
@greenstreet704
@greenstreet704 Күн бұрын
great explanation. thanks!!
@kenrosenberg8835
@kenrosenberg8835 3 жыл бұрын
Alas! I found one great example of what Async really is.
@taissernakour6289
@taissernakour6289 Жыл бұрын
Awesome explanation!!!!
@moizkhalid2714
@moizkhalid2714 3 жыл бұрын
Your videos are so ... I am lost the words wonderful.
@bishbish9111
@bishbish9111 4 жыл бұрын
Great explanetion, thanks.
@niki6399
@niki6399 3 жыл бұрын
thank you for this great explanation
@pamintuanjohnjosuahm.2492
@pamintuanjohnjosuahm.2492 Жыл бұрын
Thank you, Kyle!
@dudeimadolphin4318
@dudeimadolphin4318 5 жыл бұрын
thanks man i was always confused about that
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
No problem. I'm glad I could help.
@piyushaggarwal5207
@piyushaggarwal5207 2 жыл бұрын
thanks for the video Kyle
@aqifsariman
@aqifsariman 2 жыл бұрын
This helped a lot. Thanks a lot!!!
@rafaelbertelli89
@rafaelbertelli89 4 жыл бұрын
Great video, great concepts!
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Thanks! I'm glad you enjoyed it.
@adwaitmathkari
@adwaitmathkari 4 жыл бұрын
Hi, Can you make a video on how javascript works while executing the code internally? Thanks a lot! And amazing videos thank you!!
@stephentsang9194
@stephentsang9194 3 жыл бұрын
great video. I am more confused about scope within the Async function. can you assign a value to global variables within an Async function. for some reasons, I cannot seem to get that to work
@nguyentranconghuy6965
@nguyentranconghuy6965 3 жыл бұрын
nicely done, thank you!
@guzel7
@guzel7 Жыл бұрын
Wow! Thanks 💙 You gained a sub
@soumyadipmajumder3450
@soumyadipmajumder3450 9 ай бұрын
Very well explained
@indikarange2495
@indikarange2495 3 жыл бұрын
Very good explanation
@bullz3718
@bullz3718 2 жыл бұрын
Brilliantly explained!
@syedarmaghanhassan4652
@syedarmaghanhassan4652 3 жыл бұрын
Hey Kail. At 6:33, I think what you were trying to say was: Every asynchronous function takes a function argument, but not every function that does so is asynchronous. You actually said the second part in two ways. Can you please tell us more about promise and fetch functions: I really did not get it with this video. Thanks !
@zathkal4004
@zathkal4004 2 жыл бұрын
A promise operates in an async manner by default thereby it wait till all the data is fetched in the .then function.... Its similar to using async and await in a fetch method (typical synthetic sugar)
@saiakhil1997
@saiakhil1997 2 жыл бұрын
Thank you for the explanation
@navekeinan
@navekeinan 3 жыл бұрын
Very good explaination
@stith_pragya
@stith_pragya 10 ай бұрын
Thank You So Much Brother.......🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@balaganesh3440
@balaganesh3440 4 жыл бұрын
Short and sweet!💯
@RedEyedJedi
@RedEyedJedi 4 жыл бұрын
Asynchronous code won't execute until the call stack is empty. So you you set a setTimeout function to run with 1ms but then called a function that did a lot of work, the code inside the setTimeout function won't run until the other function was popped off the call stack even though more than 1ms would have already passed. Technically JavaScript is a synchronous language with only 1 thread but it has some clever ways of emulating multi-threaded programming.
@jeffcarey4285
@jeffcarey4285 2 жыл бұрын
Even if you make it 0ms what you said is true
@adityaretissin1856
@adityaretissin1856 3 жыл бұрын
I’ve noticed a guitar in the background in your videos. Did you make the intro riff :P
@keassa9486
@keassa9486 3 жыл бұрын
Thank you for making my life easier 🤩
@aushafy
@aushafy 3 жыл бұрын
Helpful and very very clear
@willgale7187
@willgale7187 3 жыл бұрын
awesome explanation
@galihhad
@galihhad Жыл бұрын
Thank you ive been confused
@consumeentertainment9310
@consumeentertainment9310 Жыл бұрын
This is how good teachers teach. Thanks a lot
@mrblackc1459
@mrblackc1459 4 жыл бұрын
Very cool, Do make a complete vedio on nodejs
@shaunpeh6995
@shaunpeh6995 2 жыл бұрын
Given the scenario mentioned in the video, how can we get a =1 instead of a becoming 10 for an async operation?
@mortenlund1418
@mortenlund1418 3 жыл бұрын
Thanks for a great video.
@paranjay4776
@paranjay4776 3 жыл бұрын
well explained👍👍
@ThePassportPapi
@ThePassportPapi 3 жыл бұрын
very good explanation
@Richard.halabi
@Richard.halabi 3 жыл бұрын
thanks for the concept you know to explain thanks.
@habibiSD
@habibiSD 4 жыл бұрын
Great work man.
@raakesh401
@raakesh401 Жыл бұрын
clear and concise
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 3,9 МЛН
Они убрались очень быстро!
00:40
Аришнев
Рет қаралды 919 М.
MOM TURNED THE NOODLES PINK😱
00:31
JULI_PROETO
Рет қаралды 22 МЛН
How Did I Not Know This TypeScript Trick Earlier??!
9:11
Josh tried coding
Рет қаралды 202 М.
Differences Between Var, Let, and Const
8:37
Web Dev Simplified
Рет қаралды 180 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
The Async Await Episode I Promised
12:04
Fireship
Рет қаралды 1,1 МЛН
Javascript Promises vs Async Await EXPLAINED (in 5 minutes)
5:50
Roberts Dev Talk
Рет қаралды 539 М.
Learn JavaScript DOM Traversal In 15 Minutes
14:44
Web Dev Simplified
Рет қаралды 219 М.
What is JavaScript CALLBACK HELL? 🔥
5:49
Bro Code
Рет қаралды 15 М.
C# Async Await Mistakes | Part 1
10:19
Amichai Mantinband
Рет қаралды 29 М.
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 3,9 МЛН