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

  Рет қаралды 95,114

developedbyed

developedbyed

Күн бұрын

Пікірлер
@developedbyed
@developedbyed Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
That would be nice :)
@dev_franqqi
@dev_franqqi Жыл бұрын
That sounds fire
@joseduargu
@joseduargu Жыл бұрын
amazing idea
@marshall-brown
@marshall-brown Жыл бұрын
Yes, full send that idea!
@gambomaster
@gambomaster Жыл бұрын
Thanks again my gorgeous teacher on the internet. 🙏
@FaithFedora
@FaithFedora Жыл бұрын
Love it 😂😂😂
@JanakiNarayana-cm8fn
@JanakiNarayana-cm8fn 10 ай бұрын
😂😂😂
@SarveshSawant-zk7xy
@SarveshSawant-zk7xy Жыл бұрын
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
@Ndzzle
@Ndzzle Жыл бұрын
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
@shs4293
@shs4293 Жыл бұрын
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.
@patricklemmer-adeveloperss3458
@patricklemmer-adeveloperss3458 Жыл бұрын
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!
@bareenlars
@bareenlars 8 ай бұрын
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 :)
@anna-booklove
@anna-booklove Жыл бұрын
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!
@robgioeli
@robgioeli Жыл бұрын
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 👍🏻🔥
@RychAhlberg
@RychAhlberg Жыл бұрын
You’re so good at explaining thoroughly. Thank you very much!
@костякосогоров-з9о
@костякосогоров-з9о 6 ай бұрын
This is the first KZbin video that made me happy, thank you my friend, I've wanted to understand this topic for so long and finally I found someone who could describe the workings of JavaScript so thoroughly.
@CristianKirk
@CristianKirk Жыл бұрын
Super nice to see actual programming in this channel and not just trendy frameworks conventions.
@yanndjoumessi7130
@yanndjoumessi7130 Жыл бұрын
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.
@Kuramas_Chakra
@Kuramas_Chakra Жыл бұрын
Microsoft's True Intention Leaked at 7:18 !
@getrogo4474
@getrogo4474 Жыл бұрын
7:56 caught me off guard hahahahahaha
@SolidJello
@SolidJello 4 ай бұрын
The first video that actually got straight to it with live examples and helped.
@saadafm
@saadafm 6 ай бұрын
This is EASILY the best video on these topics
@srikarravoori124
@srikarravoori124 11 ай бұрын
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
@alfiartya23
@alfiartya23 Жыл бұрын
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! 😄
@anonygsc6851
@anonygsc6851 Жыл бұрын
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
@realworldcodingapplications
@realworldcodingapplications Жыл бұрын
i absolutely enjoy this kind of humor when I'm learnign to program, so thank you for that! Makes learnign much less mind numbing
@vinci-g
@vinci-g Жыл бұрын
"Time's up m*therf*cker!" Had me on the floor rolling LMAO
@justfun591
@justfun591 5 ай бұрын
This video is must watch if you're are going for an interview
@deepakroy3459
@deepakroy3459 Жыл бұрын
I am telling you,This guy is a GEM❤
@Antonio-yn4mb
@Antonio-yn4mb Жыл бұрын
When your team leader is Samuel L. Jackson 7:55
@kvebalas5931
@kvebalas5931 Жыл бұрын
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 Жыл бұрын
He meant Last in First out LiFo I guess
@ichiroutakashima4503
@ichiroutakashima4503 Жыл бұрын
I love this. Always good to watch such concepts because it's a refresher.
@ankamsarav
@ankamsarav 9 ай бұрын
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
@Richard-LaFleur
@Richard-LaFleur Жыл бұрын
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?
@cmdrTremyss
@cmdrTremyss Жыл бұрын
Love the new format, I think I finally get how async works
@maherylala2153
@maherylala2153 Жыл бұрын
Really waited for that one from you, thanks !
@ways.
@ways. 8 ай бұрын
this is my new favorite channel
@enigmaSpy
@enigmaSpy Жыл бұрын
Nawet nie zdajesz sobie sprawy jak bardzo długo szukałem tego typu video, spadłeś mi po prostu z nieba❤
@naczelnypsycholog6296
@naczelnypsycholog6296 Жыл бұрын
to jest Polak ?????????????????
@AyJay123
@AyJay123 Жыл бұрын
7:55 im going to say this everytime I run a setTimeout from now on 🤷‍♂️😂
@iitz_danny
@iitz_danny Жыл бұрын
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😅
@aftonlawver3827
@aftonlawver3827 Жыл бұрын
Great explanation of the call stack vs the web API's and event loop!
@testingBuyer
@testingBuyer 11 ай бұрын
wonderful and precise tutorial ,wins a subscription
@fried-eggscelleration
@fried-eggscelleration 9 ай бұрын
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?
@CodeWithCGPT
@CodeWithCGPT 6 ай бұрын
Hi Man I am seeing you after three years thanks good your video very help for me when I am fresher
@6slave
@6slave 6 ай бұрын
what extension do you use to have icons like that?
@RVAraghav
@RVAraghav Жыл бұрын
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? ❤
@encourage-fm3fo
@encourage-fm3fo Жыл бұрын
This was fantastic! Exactly what I was looking for.
@SecondBekfast
@SecondBekfast Жыл бұрын
Are you using an OLED tv as a monitor?
@endritibra4351
@endritibra4351 Жыл бұрын
This was a masterpiece by Ed, a comment from an experienced developer
@nickveldkamp5396
@nickveldkamp5396 Жыл бұрын
Do u create also a video about Axios ;) ?
@diganta64
@diganta64 Жыл бұрын
One of the best session watched..:)
@anandumdharan6283
@anandumdharan6283 Жыл бұрын
Much needed bruddah......thanks a lot ed
@jayaprakash_dev
@jayaprakash_dev Жыл бұрын
do the web APIs run in different threads?
@juliensavary
@juliensavary Жыл бұрын
worker threads are changing the single threaded nature of js
@chaimaegrich4510
@chaimaegrich4510 Жыл бұрын
Hi Ed, can I get the name of the music in the background please
@mostafakheder7721
@mostafakheder7721 Жыл бұрын
Nice work , I believe this episode is great
@andreeapurta457
@andreeapurta457 4 ай бұрын
I wanted to find out how the promise and async func looks on stack/queue/api...
@Pareshbpatel
@Pareshbpatel Жыл бұрын
Async JS; nicely explained. Thanks, Ed {2023-06-27}
@DawFa10
@DawFa10 Жыл бұрын
Great video, and really well explained on the different concepts!
@chhavimanichoubey9437
@chhavimanichoubey9437 Жыл бұрын
I was unable to hold myself when you said 2000 seconds.
@paulthomas1052
@paulthomas1052 Жыл бұрын
Great demo and explanation. Cheers !
@nasratt
@nasratt Жыл бұрын
What is that VSCode theme? anyone knows?
@ahmadbilalfarooqi
@ahmadbilalfarooqi Жыл бұрын
i gona revised function and your teaching way is sooo awesome async function is more than easy by Promise
@deepanshusharma9311
@deepanshusharma9311 Жыл бұрын
WOW🤩 Very nice Explanation
@hiafraan
@hiafraan Жыл бұрын
Thank you for the great explanation! ❤️
@Terms-and-Conditions
@Terms-and-Conditions Жыл бұрын
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
@momomadi2
@momomadi2 Жыл бұрын
nice explanation -- thanks bro
@БогданЯцентюк-ч9ч
@БогданЯцентюк-ч9ч Жыл бұрын
Thank you! Good and useful content 😎
@zeusor
@zeusor Жыл бұрын
I think he meant Last in First out LiFo 9:36
@fullstackspiderman
@fullstackspiderman Жыл бұрын
@Ed, could you please create testing React App courses or KZbin videos using RTL, Vitest for unit and integration and Cypress for E2E testing
@kimhwanhoon
@kimhwanhoon Жыл бұрын
Love it thank you so much man!
@parsina4971
@parsina4971 Жыл бұрын
thanks pal❤❤
@KaiaLoken
@KaiaLoken 8 ай бұрын
Thank you for this
@apex-lazer
@apex-lazer Жыл бұрын
Faking luv you eddy Boiii!
@joshuamackinnon1250
@joshuamackinnon1250 Жыл бұрын
Great video!
@aps69
@aps69 Жыл бұрын
Add those chapters Ed
@TJPBataller
@TJPBataller 10 ай бұрын
I thought callstack is FILO. or FIFO? not sure anymore.
@MaxenGaynier28
@MaxenGaynier28 Жыл бұрын
Dr. Strange is teaching programming now? That's cool..
@robgioeli
@robgioeli Жыл бұрын
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!
@nareshg128
@nareshg128 4 ай бұрын
just awesome .
@JohanDeGroot1982
@JohanDeGroot1982 Жыл бұрын
THANK YOU!!!
@spaceageboys3485
@spaceageboys3485 3 ай бұрын
Made my setTimeout for 2000 seconds and waited over half an hour…
@singingrockstar9698
@singingrockstar9698 Жыл бұрын
😂😂😂 tick tock tik took tiMesuP !!!😅
@pfcokelly
@pfcokelly Жыл бұрын
Tik tok, times up MFer. Great lesson!
@LászlóKis-d1t
@LászlóKis-d1t Жыл бұрын
7:43 --> *ms
@SebastianOnofrei
@SebastianOnofrei Жыл бұрын
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 ;) !
@ServanFICHET
@ServanFICHET Жыл бұрын
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 Жыл бұрын
Oh that’s alright! Which bit did you find confusing? 😊
@ServanFICHET
@ServanFICHET Жыл бұрын
@@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 ;)
@gorkemtr
@gorkemtr Жыл бұрын
thks, take care of your health
@manshulduggal5482
@manshulduggal5482 Жыл бұрын
2:30
@anony88
@anony88 Жыл бұрын
Ed I need another video like this but explain it to me like I'm 12 lol
@naczelnypsycholog6296
@naczelnypsycholog6296 Жыл бұрын
love the sweater❤, no homo
@andrewSantosMaia
@andrewSantosMaia Жыл бұрын
You re really funny!
@vitaminprutin8217
@vitaminprutin8217 Жыл бұрын
loved it
@morale3056
@morale3056 Жыл бұрын
Damn! Nice and easy!
@vanshshah7781
@vanshshah7781 Жыл бұрын
Amazing
@consoledoterror971
@consoledoterror971 Жыл бұрын
nice refreshing video after a long time. i would say you could have started with hoisting first.
@TUSHARMORE_09
@TUSHARMORE_09 7 ай бұрын
Thanks! to Gorgeous teacher on internate 💝❤
@aadarshverma6913
@aadarshverma6913 10 ай бұрын
theon gratjoy
@nishantpatil1632
@nishantpatil1632 Жыл бұрын
keep eye on health buddy...
@salotspread
@salotspread 10 ай бұрын
putangina you described it the best very noice moite i subbed.
@Rashik25
@Rashik25 Жыл бұрын
😊 Awesome
@APG9tvlivenews
@APG9tvlivenews Жыл бұрын
🎉
@98f5
@98f5 Жыл бұрын
is this stuff really considered advanced?
@germantoenglish898
@germantoenglish898 Жыл бұрын
Don't forget about the Swedish and Norwegians 😉
@anshvashisht8519
@anshvashisht8519 Жыл бұрын
can i get the source code for this video?
The Importance of THIS in Javascript
22:59
developedbyed
Рет қаралды 22 М.
Async JavaScript & Callback Functions -- Tutorial for Beginners
24:21
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
React Hooks Crash Course (useMemo, useCallback and more).
31:49
developedbyed
Рет қаралды 88 М.
Realtime updates with next.js, socket.io and a redis publisher
16:14
Top 10 Javascript One Liners YOU MUST KNOW!
14:16
developedbyed
Рет қаралды 197 М.
JavaScript Promises Crash Course
24:03
Kevin Powell
Рет қаралды 39 М.
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 987 М.
JavaScript Visualized - Execution Contexts
11:41
Lydia Hallie
Рет қаралды 75 М.