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

Комментарии • 53

  • @inordirectional
    @inordirectional 2 года назад +21

    This bootcamp seems like a highly organized and effective cult, I'm into it

  • @jasmine1414
    @jasmine1414 3 года назад +12

    I never thought I would be able to learn this and understand this. Thank you!

  • @enginerdwithprince
    @enginerdwithprince 5 месяцев назад +1

    As always good work by codesmitth ♥

  • @ashimov1970
    @ashimov1970 2 года назад +6

    My wholehearted gratitude for this superb class goes to Michael and the student team. God bless y'all

  • @windubitably
    @windubitably 3 года назад +1

    Clicked on this as soon as I saw Michael! Great teacher, and such a necessary topic for those learning JavaScript.

  • @dev-am1303
    @dev-am1303 3 года назад +3

    thank you codesmith and Michael for this amazing course .

  • @hattietavares2923
    @hattietavares2923 2 года назад +1

    Love the energy here, Michael seems like an awesome teacher, and this really clarified a lot of things! Thanks so much.

  • @juku915
    @juku915 2 года назад +2

    This is freaking marvelous! Much thanks

  • @UKRapGenius
    @UKRapGenius 2 года назад

    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!

  • @tax7934
    @tax7934 2 года назад

    The best lecture on RUclips.

  • @urbanframesph258
    @urbanframesph258 2 года назад +1

    How I wish I could attend this kind workshops! Thank you for this amazing toturials! :)

  • @danielvega646
    @danielvega646 Год назад

    Great bootcamp! Greetings from Colombia

  • @thebattinson1278
    @thebattinson1278 2 года назад +1

    Great vid, this was ... SPECTACULAR !

  • @azazulsoulmeister7959
    @azazulsoulmeister7959 Год назад

    Spectacular

  • @stanleyakpeji7695
    @stanleyakpeji7695 2 года назад

    The best tutorial on the subject matter by a mile. Thanks Boss you did a great job .

  • @pushkarkumar5578
    @pushkarkumar5578 3 года назад +2

    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. ❤️❤️

  • @oneofone_1333
    @oneofone_1333 3 года назад

    Great explanation Michael. Greetings from Zurich!

  • @rorycawley
    @rorycawley 2 года назад +2

    actual value === argument, placeholder === parameter (nice!)

  • @elik3765
    @elik3765 Год назад

    MAGNIFICENT!!!

  • @adelinrapcore
    @adelinrapcore 2 года назад +1

    The only word that comes in my mind, describing this is, spectacular. No idea why :p

  • @jianzhonghuang164
    @jianzhonghuang164 Год назад

    Thanks. I've learnt a lot of new concepts from this video and also figure out some questions which confuses me.

    • @Codesmith
      @Codesmith  Год назад

      We love that you were able to clarify some concepts that were challenging! Async is a tough one!

  • @icebridge3940
    @icebridge3940 3 года назад

    Amazing - Really want to up my JS knowledge. This was super educational.

  • @fadygamilmahrousmasoud5863
    @fadygamilmahrousmasoud5863 Год назад

    amazing, pure gold really :D

  • @anastasiaivashchenko6338
    @anastasiaivashchenko6338 2 года назад

    I cant believe this video doesn't have 0ver 100k views

  • @tf1n
    @tf1n 2 года назад

    Fantastic, thank you.

  • @Moon-oz3mu
    @Moon-oz3mu Год назад

    you are gifted 😍

  • @k4qdex
    @k4qdex 27 дней назад

    intro is the los pollos hermanos commercial

  • @piotrszponder123
    @piotrszponder123 3 года назад +2

    so when they are talking about execution context, is this the same as scope?

  • @jianzhonghuang164
    @jianzhonghuang164 Год назад

    when teacher says "we open up a new what, execution context" is so funny.

  • @karan9r
    @karan9r 2 года назад

    This was amazing. Are there any more lectures available from Michael.? Can't find anything on youtube

  • @anastasiaivashchenko6338
    @anastasiaivashchenko6338 2 года назад

    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!!!

  • @cybercracker3
    @cybercracker3 3 года назад +1

    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

  • @matrixtoogood5601
    @matrixtoogood5601 2 года назад

    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?

  • @MRagab-rq6pq
    @MRagab-rq6pq 2 месяца назад

    Can i know who is the instructor ?
    He is brilliant !

    • @Codesmith
      @Codesmith  2 месяца назад

      He's great right? Michael o'Halloran., Codesmith alum

  • @kaleab27
    @kaleab27 2 года назад

    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

  • @mayanksharma7513
    @mayanksharma7513 2 года назад

    [38:05] Call back queue and event loop example

  • @wrfx0rz
    @wrfx0rz Год назад

    Jelly on the bread before peanut butter? Madman.

  • @rorycawley
    @rorycawley 2 года назад

    Great fun

  • @tylerpohn8935
    @tylerpohn8935 3 года назад

    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

    • @sebjo4500
      @sebjo4500 2 года назад

      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)

    • @vishaljoshi3645
      @vishaljoshi3645 2 года назад +3

      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.

  • @PumpkinSpicePretzels
    @PumpkinSpicePretzels Год назад

    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.

  • @subhashgn1775
    @subhashgn1775 3 года назад

    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??????

  • @kim92se64
    @kim92se64 Год назад

    2H03M

  • @thebattinson1278
    @thebattinson1278 Год назад

    Thee .. thee ... EXECUTION CONTEXT ! Amen