How Async Javascript works (Callback Hell, Promises, Async Await, Call Stack and more)

  Рет қаралды 76,328

developedbyed

developedbyed

Күн бұрын

Check out my web development courses here 🔥
developedbyed.com/
🛴 Follow me on:
Twitch: / developedbyed
Twitter: / developedbyed
Instagram: / developedbyed
Github: github.com/developedbyed/
#programming

Пікірлер: 126
@developedbyed
@developedbyed 10 ай бұрын
I think it would be really fun if we did a series on focusing on one specific aspect of Javascipt and make a fun series out of it! Example: A full episode on event handlers (how to make a custom one, how it works, etc etc) 👀 Let me know if you like the idea 🔥 Anyone playing Street Fighter 6?
@yoJuicy
@yoJuicy 10 ай бұрын
Great ideas Ed! thanks for teaching. Youre hitting 1 million this year bro! I love the idea of intermediate/advanced concepts because often times people explain things shallowly in their examples (for time) so its difficult to understand concepts when you want to use them in your own way. Other concepts that are kinda important: prop drilling (now with client & server comps this is critical) Closures [functional programming], prototypes, OOP, event loop, Linked list, Hash, BFS, DFS. Cheers
@belkocik
@belkocik 10 ай бұрын
That would be nice :)
@dev_franqqi
@dev_franqqi 10 ай бұрын
That sounds fire
@joseduargu
@joseduargu 10 ай бұрын
amazing idea
@marshall-brown
@marshall-brown 10 ай бұрын
Yes, full send that idea!
@robgioeli
@robgioeli 10 ай бұрын
I’ve been coding for close to 8 years now and have been been watching videos for quite many years and I’d just like let you know that your recent videos have been gold. I think the basics and creating clones of apps are long overplayed and many people will benefit from videos like this. Awesome teacher, would love to see you teach people more technical stuff like you have been the last month 👍🏻🔥
@patricklemmer-adeveloperss3458
@patricklemmer-adeveloperss3458 10 ай бұрын
THE best video I personally have seen about these concepts. I have started learning how to code early last year and JS is still very difficult for me at time. This video has helped me understand things in 30 mins that I have not understood in the last 1.5 years. Huge compliment and please keep doing these basic concept JS videos, they are gold!
@pennyklen4973
@pennyklen4973 8 ай бұрын
You’re so good at explaining thoroughly. Thank you very much!
@yanndjoumessi7130
@yanndjoumessi7130 10 ай бұрын
That's definitely a great video to put everything in context. I personally would like to see such a format with different JS topics. I don't think that it's really entertaining but for people loving to understand deeply what's going on, it's definitely a much better approach.
@annawolf8540
@annawolf8540 10 ай бұрын
Great timing! I‘m working as a react developer for 1 1/2 years now and sometimes I‘m just not aware of some of this concept. This was super interesting to get a little refresher and a deeper understanding!
@anonygsc6851
@anonygsc6851 10 ай бұрын
Hi Ed, I really appreciate your videos as i decided to use a JS framework to rewrite a project that was pooly optimised in a different technology. It really helps to watch someone when reading docs becomes tiring. Thanks
@alfiartya23
@alfiartya23 10 ай бұрын
As always, the way Ed teaching me with his funny way that makes me easily understand again about this context. I remember first time I learn Javascript is from Ed JS playlist, so thank you so much Ed! 😄
@gambomaster
@gambomaster 10 ай бұрын
Thanks again my gorgeous teacher on the internet. 🙏
@FaithFedora
@FaithFedora 5 ай бұрын
Love it 😂😂😂
@JanakiNarayana-cm8fn
@JanakiNarayana-cm8fn 2 ай бұрын
😂😂😂
@ichiroutakashima4503
@ichiroutakashima4503 10 ай бұрын
I love this. Always good to watch such concepts because it's a refresher.
@aftonlawver3827
@aftonlawver3827 10 ай бұрын
Great explanation of the call stack vs the web API's and event loop!
@CristianKirk
@CristianKirk 10 ай бұрын
Super nice to see actual programming in this channel and not just trendy frameworks conventions.
@realworldcodingapplications
@realworldcodingapplications 8 ай бұрын
i absolutely enjoy this kind of humor when I'm learnign to program, so thank you for that! Makes learnign much less mind numbing
@maherylala2153
@maherylala2153 10 ай бұрын
Really waited for that one from you, thanks !
@enigmaSpy
@enigmaSpy 10 ай бұрын
Nawet nie zdajesz sobie sprawy jak bardzo długo szukałem tego typu video, spadłeś mi po prostu z nieba❤
@naczelnypsycholog6296
@naczelnypsycholog6296 10 ай бұрын
to jest Polak ?????????????????
@Ndzzle
@Ndzzle 10 ай бұрын
SetTimeout is a webAPI. This gets handled by the browser instead of JavaScript. So instead of going staight into the queue, it goes into the WebAPI stack until the time is up. Then gets pushed into the queue, behind the other logs which is why it shows up last
@encourage-fm3fo
@encourage-fm3fo 10 ай бұрын
This was fantastic! Exactly what I was looking for.
@shs4293
@shs4293 9 ай бұрын
Been working on Js since years but trust me, haven't found callbacks & promises being explained like this, even a junior dev could understand this without any hassle.
@DawFa10
@DawFa10 10 ай бұрын
Great video, and really well explained on the different concepts!
@cmdrTremyss
@cmdrTremyss 10 ай бұрын
Love the new format, I think I finally get how async works
@RVAraghav
@RVAraghav 10 ай бұрын
I have been following you for many years now and the excitement never stops when I see your video every time. Btw the video clarity is fantastic. What’s the camera you’re using? ❤
@testingBuyer
@testingBuyer 3 ай бұрын
wonderful and precise tutorial ,wins a subscription
@iitz_danny
@iitz_danny 10 ай бұрын
I just had an interview that went over these concepts too. Wish I would have watched this video beforehand. I’m definitely turning on the notifications now😅
@paulthomas1052
@paulthomas1052 10 ай бұрын
Great demo and explanation. Cheers !
@diganta64
@diganta64 5 ай бұрын
One of the best session watched..:)
@HiAfraan
@HiAfraan 5 ай бұрын
Thank you for the great explanation! ❤️
@kimhwanhoon
@kimhwanhoon 10 ай бұрын
Love it thank you so much man!
@anandumdharan6283
@anandumdharan6283 10 ай бұрын
Much needed bruddah......thanks a lot ed
@momomadi2
@momomadi2 6 ай бұрын
nice explanation -- thanks bro
@ways.
@ways. Ай бұрын
this is my new favorite channel
@deepakroy3459
@deepakroy3459 8 ай бұрын
I am telling you,This guy is a GEM❤
@user-kb4le4me2d
@user-kb4le4me2d 5 ай бұрын
Thank you! Good and useful content 😎
@mostafakheder7721
@mostafakheder7721 10 ай бұрын
Nice work , I believe this episode is great
@vinci-g
@vinci-g 8 ай бұрын
"Time's up m*therf*cker!" Had me on the floor rolling LMAO
@deepanshusharma9311
@deepanshusharma9311 10 ай бұрын
WOW🤩 Very nice Explanation
@KaiaLoken
@KaiaLoken 17 күн бұрын
Thank you for this
@JohanDeGroot1982
@JohanDeGroot1982 10 ай бұрын
THANK YOU!!!
@ahmadbilalfarooqi5731
@ahmadbilalfarooqi5731 10 ай бұрын
i gona revised function and your teaching way is sooo awesome async function is more than easy by Promise
@ashmitsharma9096
@ashmitsharma9096 9 ай бұрын
Correction: 9:36 CallStack works on LIFO and Callback queue works on FIFO. ⚠Warning Your this video is now obsolete: kzbin.info/www/bejne/lWnKeXt4ocetn9k&t
@vanshshah7781
@vanshshah7781 8 ай бұрын
Amazing
@SarveshSawant-zk7xy
@SarveshSawant-zk7xy 6 ай бұрын
02:13 - Two types of context 06:54 - first console log, third and then second is called because of call stack 08:22 - Call Stack 14:54 - Call Back Hell 19:50 - Custom Promise Example 22:43 - Real word promise example 26:35 - Async and await example
@parsina4971
@parsina4971 6 ай бұрын
thanks pal❤❤
@endritibra4351
@endritibra4351 10 ай бұрын
This was a masterpiece by Ed, a comment from an experienced developer
@jayaprakash_dev
@jayaprakash_dev 7 ай бұрын
do the web APIs run in different threads?
@bareenlars
@bareenlars Ай бұрын
Hi, great video! New to promises and await, @26:45 why do we need to await when creating the const data ? isnt the variable response already set/saved? or is it just a placeholder for the function? If so, the await command is already in the response variable. Just trying to understand :)
@joshuamackinnon1250
@joshuamackinnon1250 10 ай бұрын
Great video!
@fullstackspiderman
@fullstackspiderman 10 ай бұрын
@Ed, could you please create testing React App courses or KZbin videos using RTL, Vitest for unit and integration and Cypress for E2E testing
@nickveldkamp5396
@nickveldkamp5396 10 ай бұрын
Do u create also a video about Axios ;) ?
@es2cs
@es2cs 10 ай бұрын
7:55 im going to say this everytime I run a setTimeout from now on 🤷‍♂️😂
@getrogo4474
@getrogo4474 8 ай бұрын
7:56 caught me off guard hahahahahaha
@Richard-LaFleur
@Richard-LaFleur 10 ай бұрын
9:28 Shouldn't it get pushed one by one, only when previous removeTodo() finishes and call stack is empty, and not everything at once?
@fried-eggscelleration
@fried-eggscelleration Ай бұрын
Nice video, but how can I get a value from the response returned as part of the function? Seems like the return value of a async function is always a promise? how can I get even maybe a wrapper function to just give me a string in the end, after waiting for the result?
@Kuramas_Chakra
@Kuramas_Chakra 7 ай бұрын
Microsoft's True Intention Leaked at 7:18 !
@ankamsarav
@ankamsarav 2 ай бұрын
I feel the remove function which you showed stacking in call stack section is wrong because queue will not push the functions unless the stack is empty
@vitaminprutin8217
@vitaminprutin8217 10 ай бұрын
loved it
@robgioeli
@robgioeli 10 ай бұрын
Hey ed 👋🏼 also if you like live wallpaper, Razer makes amazing high quality software that I think called Cortex? High quality live wallpaper 👍🏻 best I’ve used!
@mjbalcueva6485
@mjbalcueva6485 10 ай бұрын
anyone knows what his vscode theme is? it looks really clean awesome vid btw, keep it up
@CodeOnBlocks
@CodeOnBlocks 10 ай бұрын
Did you figure out what the theme was called? I can't find it.
@juliensavary
@juliensavary 10 ай бұрын
worker threads are changing the single threaded nature of js
@chaimaegrich4510
@chaimaegrich4510 6 ай бұрын
Hi Ed, can I get the name of the music in the background please
@kvebalas5931
@kvebalas5931 8 ай бұрын
9:30 First in First out doesn't work that way. It pushes on top, but process the first (oldest) one on the bottom.
@zeusor
@zeusor 7 ай бұрын
He meant Last in First out LiFo I guess
@chhavimanichoubey9437
@chhavimanichoubey9437 10 ай бұрын
I was unable to hold myself when you said 2000 seconds.
@apex-lazer
@apex-lazer 5 ай бұрын
Faking luv you eddy Boiii!
@Pareshbpatel
@Pareshbpatel 10 ай бұрын
Async JS; nicely explained. Thanks, Ed {2023-06-27}
@morale3056
@morale3056 10 ай бұрын
Damn! Nice and easy!
@CalmConcept
@CalmConcept 10 ай бұрын
Are you using an OLED tv as a monitor?
@nasratt
@nasratt 10 ай бұрын
What is that VSCode theme? anyone knows?
@aps69
@aps69 10 ай бұрын
Add those chapters Ed
@zeusor
@zeusor 7 ай бұрын
I think he meant Last in First out LiFo 9:36
@srikarravoori124
@srikarravoori124 3 ай бұрын
After a long, I see you. By the way seeing your video I happened to become a software engineer at the age of 41 and completing 3 years now
@manshulduggal5482
@manshulduggal5482 8 ай бұрын
2:30
@andrewSantosMaia
@andrewSantosMaia 8 ай бұрын
You re really funny!
@Antonio-yn4mb
@Antonio-yn4mb 9 ай бұрын
When your team leader is Samuel L. Jackson 7:55
@user-ob7ht2ld9b
@user-ob7ht2ld9b 10 ай бұрын
@dennisbelio6470
@dennisbelio6470 10 ай бұрын
👏👏👏
@Rashik25
@Rashik25 10 ай бұрын
😊 Awesome
@G9tvlivenews
@G9tvlivenews 10 ай бұрын
🎉
@Terms-and-Conditions
@Terms-and-Conditions 10 ай бұрын
Would it look better if you flip/mirror your camera horizontal? so it looks like you are looking at the actual content while showing it to us
@user-mo1qs8kl5o
@user-mo1qs8kl5o 10 ай бұрын
7:43 --> *ms
@anony88
@anony88 10 ай бұрын
Ed I need another video like this but explain it to me like I'm 12 lol
@gorkemtr
@gorkemtr 10 ай бұрын
thks, take care of your health
@SebastianOnofrei
@SebastianOnofrei 5 ай бұрын
I was very concentrated on what you explain then you came with the ' tick tac , tick tac , tick tac , time is up mothafucka' :)))) MY BELLY HURT BECAUSE OF LAUGHING . Other than that , excellent explanations ! Multumesc frumos ;) !
@TJPBataller
@TJPBataller 2 ай бұрын
I thought callstack is FILO. or FIFO? not sure anymore.
@MaxenGaynier28
@MaxenGaynier28 10 ай бұрын
Dr. Strange is teaching programming now? That's cool..
@naczelnypsycholog6296
@naczelnypsycholog6296 10 ай бұрын
love the sweater❤, no homo
@pfcokelly
@pfcokelly 10 ай бұрын
Tik tok, times up MFer. Great lesson!
@consoledoterror971
@consoledoterror971 10 ай бұрын
nice refreshing video after a long time. i would say you could have started with hoisting first.
@singingrockstar9698
@singingrockstar9698 8 ай бұрын
😂😂😂 tick tock tik took tiMesuP !!!😅
@aadarshverma6913
@aadarshverma6913 2 ай бұрын
theon gratjoy
@salotspread
@salotspread 2 ай бұрын
putangina you described it the best very noice moite i subbed.
@germantoenglish898
@germantoenglish898 10 ай бұрын
Don't forget about the Swedish and Norwegians 😉
@ServanFICHET
@ServanFICHET 10 ай бұрын
Always love your videos but the examples are a bit confusing. I think some people might be lost… Just an honest feedback! Keep the good work! 👍🏼
@developedbyed
@developedbyed 10 ай бұрын
Oh that’s alright! Which bit did you find confusing? 😊
@ServanFICHET
@ServanFICHET 10 ай бұрын
@@developedbyed for example, the part on call stack, web APIs and event loop. I guess it is a bit difficult to understand for a beginner with the examples chosen and Excalidraw. (I know it is not easy to explain and understand visually) Also on the promise, at 18:52, I think you got confused because you called in the user object the attribute “user” instead of “name” and I would have continued in you example instead of fetching jsonplaceholder. For example, you could have created a promise which resolves if user name is “Blanka” but rejects if user name is “Ken” and then illustrates it in the .then.catch chain, and finally use the same example with async await… No offense, I am just providing my view but I might be too picky ;)
@anshvashisht8519
@anshvashisht8519 7 ай бұрын
can i get the source code for this video?
@nishantpatil1632
@nishantpatil1632 10 ай бұрын
keep eye on health buddy...
@shantanusingh1281
@shantanusingh1281 Ай бұрын
timesup mf 🤣🤣
@98f5
@98f5 10 ай бұрын
is this stuff really considered advanced?
@sendmeabouquet
@sendmeabouquet 10 ай бұрын
🆒🆒🆒
@kirtxn_
@kirtxn_ 6 ай бұрын
💕💕✅✅
@fireworks6795
@fireworks6795 6 ай бұрын
don't try to change your voice
@elg281
@elg281 10 ай бұрын
Why are you talking like that.🤓
@anirudhcodes
@anirudhcodes 10 ай бұрын
Yes please update the JS and React courses!! 🥹
The Importance of THIS in Javascript
22:59
developedbyed
Рет қаралды 20 М.
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
Айттыңба - істе ! | Synyptas 3 | 7 серия
21:55
kak budto
Рет қаралды 1,4 МЛН
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47
The Async Await Episode I Promised
12:04
Fireship
Рет қаралды 1,1 МЛН
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
Top 10 Javascript One Liners YOU MUST KNOW!
14:16
developedbyed
Рет қаралды 188 М.
How To Create Your Own Implementation Of JavaScript Promises
33:34
Web Dev Simplified
Рет қаралды 97 М.
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
5 Tips and Tricks To Make Your Life With Next js 14 Easier
17:11
developedbyed
Рет қаралды 15 М.
Компьютерная мышь за 50 рублей
0:28
Samsung mobile phone waterproof display. samsung mobile phone digital s23ultra  #shorts
0:15