JavaScript the Hard Parts: Promises, Async & the Event Loop
HTML-код
- Опубликовано: 17 сен 2024
- JavaScript the Hard Parts: Promises, Async & the Event Loop video lecture with Michael O'Halloran, Senior Software Engineer & Lead Instructor at Codesmith.
During this workshop, you will learn how to master asynchronous JavaScript and promises! Our mental models of asynchronicity in javascript - the event loop, callback queue - are no longer enough. We have to augment them with the new world of native promises and async/await and understand them intuitively. In this session, we’ll do this so you can write readable code and debug effectively.
The workshop will cover:
- The challenge with single-threadedness in JavaScript.
- How asynchronicity enables much of modern web development
- The challenge with asynchronicity in JavaScript and how promises fix the problem of inversion of control
A combination of understanding promises and async/await under the hood and strategies for effective implementation will give you the tools to write clean pro asynchronous code in your work and projects.
This video is a recording of a live workshop. To follow along live and participate in an upcoming workshop, RSVP at www.codesmith.....
SUBSCRIBE for more! 👉tinyurl.com/co... 👈
Stay connected to our community!
Codesmith: www.codesmith.io/
Learn JavaScript for Free: csx.codesmith.io/
Free Events & Workshops: www.codesmith....
Follow us to stay updated!
Facebook: / codesmithhq
Instagram: / codesmithio
Twitter: / codesmith_
LinkedIn: / codesmith-llc
#learntocode #javascript #programminglanguage
This bootcamp seems like a highly organized and effective cult, I'm into it
I never thought I would be able to learn this and understand this. Thank you!
As always good work by codesmitth ♥
My wholehearted gratitude for this superb class goes to Michael and the student team. God bless y'all
Wonderful! 🙏
Clicked on this as soon as I saw Michael! Great teacher, and such a necessary topic for those learning JavaScript.
Thanks Windu :)
thank you codesmith and Michael for this amazing course .
Love the energy here, Michael seems like an awesome teacher, and this really clarified a lot of things! Thanks so much.
This is freaking marvelous! Much thanks
At 43 minutes when you broke down the event loop checking every millisecond I knew I was less than 2 hours away from finally grasping this topic!
The best lecture on RUclips.
How I wish I could attend this kind workshops! Thank you for this amazing toturials! :)
Great bootcamp! Greetings from Colombia
Great vid, this was ... SPECTACULAR !
Spectacular
The best tutorial on the subject matter by a mile. Thanks Boss you did a great job .
thankyou for posting such a good video I love this it was like I was there in class with them. Well explained everything to detailed. ❤️❤️
Great explanation Michael. Greetings from Zurich!
actual value === argument, placeholder === parameter (nice!)
MAGNIFICENT!!!
The only word that comes in my mind, describing this is, spectacular. No idea why :p
Thanks. I've learnt a lot of new concepts from this video and also figure out some questions which confuses me.
We love that you were able to clarify some concepts that were challenging! Async is a tough one!
Amazing - Really want to up my JS knowledge. This was super educational.
amazing, pure gold really :D
I cant believe this video doesn't have 0ver 100k views
Fantastic, thank you.
you are gifted 😍
intro is the los pollos hermanos commercial
so when they are talking about execution context, is this the same as scope?
when teacher says "we open up a new what, execution context" is so funny.
This was amazing. Are there any more lectures available from Michael.? Can't find anything on youtube
HELLO :) Can you please tell me that NodeJs tutorial that has been mentioned in this video?? I can't find it on Codesmith. THANK YOU!!!
Hi
The execution order will be. (time- 2:18:00)
1. Me first
2. Hello // due to 0 millisecond it will execute first then fetch.
3. Art
Do the .log() method of the console object and the .then() method of the promise object get pushed to the call stack as well? Does a new execution context open up for these method calls as well?
Can i know who is the instructor ?
He is brilliant !
He's great right? Michael o'Halloran., Codesmith alum
Don't variables and functions get declared at the top of the execution context before qnything happens in that execution context then they will be assigned a value when the thread reaches their line?????
Edit: someone asked the question midway in the video.(1:02:00).
Thank you
[38:05] Call back queue and event loop example
Jelly on the bread before peanut butter? Madman.
Great fun
You mentioned invoking setTimout() inside of a for loop produces interesting results. When I do so below, "0 1 2 3 4" is logged rather than "4 4 4 4 4". What gives?
for (let i=0;i
Why do you think it would log "4 4 4 4 4"?
If I understand this correctly, the looped setTimeout just pushes the 5 outputs (console.log(0-4)) to the browser API at basically the same time with exactly the same delay which means they get out of the callback queue at basically the same time but with the expected outputs (0,1,2,3,4)
Using 'let' creates block-scoped variables. Here, each iteration of the loop has its own variable 'i' and the callback function "closes" over a different 'i' everytime. That is why you see "0 1 2 3 4" logged out
Change the for loop to "var i = 0 ...." and you'll see "4 4 4 4 4" logged out.
Why have a const in multiplyBy2 when you're only returning it? That's inefficient code and you'll probably get a warning in your editor about it with a link to click that cleans it up. Bad example. You can teach using a const in the function in a later example.
Great way of explaining. Thank you for this great resource. Am just curious about what are the other 6 queues other than callback queue and microtask queue. can anybody help me to get the answer??????
2H03M
Thee .. thee ... EXECUTION CONTEXT ! Amen