Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ม.ค. 2025

ความคิดเห็น • 539

  • @The9TKitsune
    @The9TKitsune 5 ปีที่แล้ว +2551

    When you want to be a stand up comedian and life makes you a JS expert

    • @eritreanism
      @eritreanism 5 ปีที่แล้ว +17

      on point :)

    • @oleksii208
      @oleksii208 5 ปีที่แล้ว +7

      hahahahah

    • @markmhaslam
      @markmhaslam 5 ปีที่แล้ว +65

      Seriously! He's super funny. I would honestly love to watch him do stand-up.

    • @MopeyFand
      @MopeyFand 4 ปีที่แล้ว +42

      Comedy is his hobby, it seems.

    • @perfect.stealth
      @perfect.stealth 4 ปีที่แล้ว +2

      Lmao

  • @ronniesunshine1163
    @ronniesunshine1163 4 ปีที่แล้ว +976

    Tough crowd, this is probably one of the best programming talks I've ever listened to

    • @ReachByteBurst
      @ReachByteBurst 2 ปีที่แล้ว +1

      true

    • @stefanplusplus917
      @stefanplusplus917 2 ปีที่แล้ว

      what do yo mean with tough crowd?

    • @andy_lamax
      @andy_lamax 2 ปีที่แล้ว +11

      I agree. This was a tough crowd

    • @bro...5849
      @bro...5849 2 ปีที่แล้ว +35

      @@stefanplusplus917 he means the crowd is difficult to make laugh

    • @TheMandySpace
      @TheMandySpace 2 ปีที่แล้ว +20

      I was there, more people laughed than you think. :D But i agree it is one of the best talks Ive ever seen

  • @JaLikon65
    @JaLikon65 ปีที่แล้ว +35

    Why on earth did people not stand up and cheer after this! This is EASILY the best talk I've ever seen on the JS event loop and related topics. Seriously, it takes other resources like 20x the time to explain this, and this is arguably more thorough then a lot of other resources. Just hats off man, WOW is this good.

  • @buddhaburrito
    @buddhaburrito 3 ปีที่แล้ว +310

    Jake is a truly genius presenter, sliding in jokes in between heavy subjects (like microtasks) so that audience can take mental rests

  • @atticoos
    @atticoos 7 ปีที่แล้ว +209

    Hot damn, Jake.. this is one of the best talks I've seen. Well done.

  • @SamiullahKhan
    @SamiullahKhan 6 ปีที่แล้ว +133

    He really hit the core of the event loop. Something that is so important to get hold of tasks, micro tasks.

  • @dakedres
    @dakedres 5 ปีที่แล้ว +29

    I love how it feels like he's going on completely unrelated tangents but it always seemlessly transitions back into the main idea

  • @Nyromancer
    @Nyromancer 7 ปีที่แล้ว +1045

    Humour is his hobby I guess. At least I find him funny, tough crowd...

    • @jakearchibald
      @jakearchibald 7 ปีที่แล้ว +133

      In standup gigs they mic the audience too. They were more alive than the video suggests (but still pretty quiet)

    • @JAlexanderCurtis
      @JAlexanderCurtis 6 ปีที่แล้ว +25

      Yeah I actually found his jokes to be pretty funny. I at least chuckled at most of them. My guess is the audience might have been giggling and chuckling too, but the laughter wasn't picked up by his lav mic. At 18:30 when he talks about the fizzy water, it's dead silent, but the way he rifted on it for a second indicates that he was probably getting a decent response from the audience.

    • @Litonfiredesign
      @Litonfiredesign 6 ปีที่แล้ว +5

      @@JAlexanderCurtis Thats him that you responded too ;-) Great work on the presentation @jake quality. Thanks for your efforts.

    • @utsavprabhakar5072
      @utsavprabhakar5072 6 ปีที่แล้ว +5

      @@jakearchibald Thanks for this !

    • @erikachurchman9417
      @erikachurchman9417 5 ปีที่แล้ว

      wow

  • @denis.klyuev
    @denis.klyuev 4 หลายเดือนก่อน +2

    I was today years old when I found out how event loop actually works. Thanks a lot, Jake! Wish you many years of health!

  • @benoitleger-derville4162
    @benoitleger-derville4162 7 ปีที่แล้ว +326

    Best show and explanation ever about the the V8 event-loop / main thread / tasks / microtasks

    • @dinub8414
      @dinub8414 6 ปีที่แล้ว +25

      Yep. Thanks to Jake! Worth mentioning, though, that the event loop doesn't run within the V8 javascript engine, but natively in the browser. The javascript runtime has no own event loop. I found Phil Roberts' talk very good, too: th-cam.com/video/8aGhZQkoFbQ/w-d-xo.html

  • @anonwithamnesia
    @anonwithamnesia 5 ปีที่แล้ว +2447

    Who is here because of Fireship?

  • @vishnusingh4118
    @vishnusingh4118 4 ปีที่แล้ว +163

    7:08 Task Queues
    8:55 render steps
    12:15 hence the timeOut loop is not 'render blocking'.
    12:29 but if you want to run code that has anything to do with rendering, a task is the wrong place to do it, coz it's on the 'opposite' side of the world from rendering, as far as the event loop is concerned.
    24:00 MicroTasks (RAF - RequestAnimationFrame finishes here )

  • @LichardD
    @LichardD 5 ปีที่แล้ว +81

    Came here to learn about event loops.
    I now fear those who drink fizzy water.

  • @maximofernandez196
    @maximofernandez196 2 ปีที่แล้ว +1

    "You don't want to write a code that is like a sneeze". Yeah, this is probably one of the best talks I've ever seen, actually pedagogical if we think about it

  • @mattscheurich1037
    @mattscheurich1037 6 ปีที่แล้ว +9

    Super great explainer, whoever did the design for the animations deserves a massive shout-out. Well thought out and great visual metaphors too.

    • @jakearchibald
      @jakearchibald 6 ปีที่แล้ว +24

      I do all my own stunts

    • @rizaldywirawan
      @rizaldywirawan 5 ปีที่แล้ว +1

      ​@@jakearchibald Full Stack Speaker, i guess :v ... Can you tell us what software do you use or how you create the animation, please?

    • @mreyybree
      @mreyybree 5 ปีที่แล้ว +1

      @@rizaldywirawan He uses HTML+CSS+JS+SVG

  • @SQUAADS
    @SQUAADS 3 ปีที่แล้ว +3

    This talk has to be displayed in the best Cinemas :) amazing talk 3 years later and im totally sure that will be a good talk to watch again in 2035

  • @api-first
    @api-first 4 ปีที่แล้ว +119

    Jake is an amazing asset for the JS community!

    • @codeaperture
      @codeaperture 3 ปีที่แล้ว +1

      I always watch this when I feel " you don't know JavaScript yet,,"

  • @anjaliRaghavmgr8
    @anjaliRaghavmgr8 4 ปีที่แล้ว +11

    Loved the energy he brings to the talk. Informatively hilarious!

  • @justinhalsall4077
    @justinhalsall4077 6 ปีที่แล้ว +7

    Love Jake's talks, always super solid, informative and even include some giggles from time to time!

  • @hgeogr
    @hgeogr 7 หลายเดือนก่อน +1

    This is one of the best education about event loop in JS. It really explains very well and helps to avoid mistakes.

  • @JuanOrigami
    @JuanOrigami 5 ปีที่แล้ว +5

    The piano chat part is totally relatable. When i do a talk in front of thousands of people I want to be as funny as this man

  • @bg_x6558
    @bg_x6558 6 ปีที่แล้ว +114

    This talk is soooo informative. A single effective visual plus narrative beats a thousand words.
    Could someone enlighten me of the tool or the way for the speaker to make the slides (or something else) ?

    • @DheerajBhaskar
      @DheerajBhaskar 6 ปีที่แล้ว +11

      I'm also interested. I think he used HTML5 and js to make this

    • @ys5399
      @ys5399 5 ปีที่แล้ว +3

      I think I know you from Columbus Ohio??

  • @ashishshubham
    @ashishshubham 6 ปีที่แล้ว +86

    I wish I learnt all my CS courses from you Jake.

  • @kieran2347
    @kieran2347 3 ปีที่แล้ว +9

    Thank you for explaining event loops for all of us 5-year-olds, Jake! You the best!

  • @markovujanic
    @markovujanic 2 ปีที่แล้ว +1

    This video sits much better after third time 'through the loop'. Thanks Jake for creating it.

  • @XAbybai
    @XAbybai 7 ปีที่แล้ว +11

    I repeat others, but I want to give the great thanks to that speaker. Very very nice talk about loop, promise, RAF and others tricky cases. Thanks you a lot!

  • @minercreepmc
    @minercreepmc 3 ปีที่แล้ว

    This is the best presentation so far i've seen from the badass talking and animation for slide, but sad for the dead crowd

  • @Ashok-wc9be
    @Ashok-wc9be 4 ปีที่แล้ว +3

    This guy is super awesome and this talk is probably the best talk on the event-loop out there! Thanks a lot!

  • @faceupanddown
    @faceupanddown 5 ปีที่แล้ว +7

    You can have a new hobby at which you are extremely good and it's technical presentations about JS and web.
    Aaaa, also, the how different queues are processed made shivers run up my neck. Really excited. Wife (who is senior QA) is getting jealous of you :p

  • @roman_mf
    @roman_mf 12 วันที่ผ่านมา

    I've watched a few visualizations of event loop and this one so far is the best one!

  • @c9988774455
    @c9988774455 7 ปีที่แล้ว +14

    I never Heard about Microtasks even though I am using Promises, Great visual comparison between JSTasks, rAF and Microtasks. Awesome stuff Jake.

  • @Pupu._
    @Pupu._ 3 ปีที่แล้ว +4

    great video! I might need to watch again to wrap up the concepts but he's a great speaker with fun ! I hope he gives us more talks like this

  • @dacao9240
    @dacao9240 2 ปีที่แล้ว

    I want to download this video and save it in my laptop, just in case youtube goes down. That's how much I love this video.

  • @SocksWithSandals
    @SocksWithSandals 5 ปีที่แล้ว +2

    I was that guy who would throw in a setTimeout and play around with the delay number until the manual test matched the automated test.
    It would raise an eyebrow at code reviews, but I'm a pragmatist not a purist.
    Now I know why I was right! Thanks Jake.

  • @ashokethapay
    @ashokethapay ปีที่แล้ว

    What an amazing talk. It cleared out lot of my queries around the event loop, when the browser prepares a frame, and how much javascript it runs before the frame. Thanks, Jake!!!

  • @indylawi5021
    @indylawi5021 5 ปีที่แล้ว +11

    Great, fun to watch, very intuitive (with a good sense of humor) presentation for a deep insight into what is going on inside the JS event loop. Jake, you definitely nail JS event loop.

  • @smitthakkar9837
    @smitthakkar9837 ปีที่แล้ว +1

    One of the best talks till date on event loop! Thanks a lot!

  • @AmandeepSingh-hd8iq
    @AmandeepSingh-hd8iq 5 ปีที่แล้ว +6

    Now this is what you call a talk. Impeccable 👌

  • @Olejoss1906
    @Olejoss1906 2 ปีที่แล้ว

    I keep getting back to this video from time to time and a question appeared in my head just now. Jake at 26:18 says "You can end up with microtask happening halfway through a task". How is that even possible? To have a microtask running, we need to have an empty Call Stack, so how could microtask happen halfway through a task?

    • @jakearchibald
      @jakearchibald 2 ปีที่แล้ว

      29:44 is about one of those cases

  • @anirudhsreerambhatla6108
    @anirudhsreerambhatla6108 5 ปีที่แล้ว

    This is one of the best talks I have seen after Phillips Roberts What the heck is the event loop? Both these talks helped me understand the Event Loop and get better context
    I then took the JS the Hard Parts from Front End Masters by Will Sentence. It was great. I got a better understanding of the the async and concurrency model of JS

    • @kf88743
      @kf88743 5 ปีที่แล้ว

      I have followed the same path, except in reverse. I came here after watching all of Will Sentence's videos on Front End Masters. He is by far my favorite instructor there.

  • @mr_ozio
    @mr_ozio 4 ปีที่แล้ว +1

    This is the must watch video before any js interview.

  • @MajorBreakfast
    @MajorBreakfast 7 ปีที่แล้ว +36

    Thank you for including the part about microtasks! Very informative!

  • @NorthEagle
    @NorthEagle 5 ปีที่แล้ว +2

    Why the F isn't this video watched 1 million times? This is amazingly informative and presented in a really really good way :-)

    • @sujitkumarsingh3200
      @sujitkumarsingh3200 5 ปีที่แล้ว

      Very few people are capable of understanding this.

  • @mukeshsoni
    @mukeshsoni 7 ปีที่แล้ว +1

    I was so stressed in the last 3-4 minutes looking at that guy standing besides Jake. I thought any second now he would pull the mic away from Jake and cuff him.
    side note - What a thoroughly enjoyable presentation 👏

    • @jakearchibald
      @jakearchibald 7 ปีที่แล้ว +2

      Yeah, that was a bit weird. I told them in advance that I might run over ~4 mins. Although I really didn't notice them standing there.

  • @xingyuye0313
    @xingyuye0313 3 ปีที่แล้ว

    This is the best talk on the "event loop" I've ever seen!

  • @bitbraindev
    @bitbraindev 10 หลายเดือนก่อน +1

    Jake reminds me a lot of Tom Scott. Great talk!

  • @ananthakrishnanj729
    @ananthakrishnanj729 5 ปีที่แล้ว +2

    Most informative and engaging talks on event loops! Kudos Jakes.

  • @karadelamarck6576
    @karadelamarck6576 7 ปีที่แล้ว +21

    Thank you for an excellent talk! Fascinating, especially regarding promises and microtasks and how the microtask queue must run to completion before the event loop can continue. Could I ask how callbacks and promises (both of which generate short-lived objects) are affected by, or affect, garbage collection? When the new space is full how does the V8 engine handle the 'stop the world' technique in relation to the event loop? Is there a potential for callbacks to be more performant regarding garbage collection vs promises?

  • @1kounter
    @1kounter 5 ปีที่แล้ว +1

    clear and simple explanation for a beginner to get a grasp of what is going on under the hood, well done! Correct if I'm wrong but I think there is a mistake in the little exercise at 30:32 . It should be promise.then('Microtask 1') instead of promise.then('Listener 1') and same for number 2.

  • @shivam.mishra
    @shivam.mishra 4 ปีที่แล้ว +1

    Never had such a clear vision of the event loop. Thanks jake

  • @johnlennon407
    @johnlennon407 ปีที่แล้ว

    Wow, what a fantastic performance! Entertaining and informative, with deep philosophical thoughts like sneezing metaphor or orbits and sun animations. The lector is brilliant.

  • @dnav10
    @dnav10 5 ปีที่แล้ว +5

    Didn't know anything about this. Now I feel like wanting to dig more into JavaScript

  • @AhmadAwais
    @AhmadAwais 7 ปีที่แล้ว +18

    Just like always, amazing presentation, especially when you magically swapped those lines around at 2:25 😲

    • @jamnic98
      @jamnic98 3 ปีที่แล้ว

      nani?!

  • @GrantH2606
    @GrantH2606 6 หลายเดือนก่อน +1

    11:12 I don't understand... After first doing the "document.body.appendChild(el)" task, why would the event loop not do a page render and THEN do the next task: "el.style.display = 'none'" before rendering again???

    • @jakearchibald
      @jakearchibald 5 หลายเดือนก่อน

      Those commands do not queue tasks

  • @thefuturejulio
    @thefuturejulio 6 ปีที่แล้ว +116

    I feel like I just watched epic blockbuster with huge budget, Tom Cruise and stuff

  • @Textras
    @Textras 7 ปีที่แล้ว +6

    Superb talk Jake. As always!! Now time for a lime soda water.

  • @paavangupta
    @paavangupta 2 ปีที่แล้ว

    His way of explaining things with so much clarity and hilarious jokes in between, is on the next level 😂🙌 Amazing!

  • @shenoynishant
    @shenoynishant 6 ปีที่แล้ว +14

    This is awesome! I had developed a parallax feature using rAF, and I was wondering why it was smooth on Chrome but janky on Edge, this explains it :)

  • @matanmizrahi2257
    @matanmizrahi2257 5 ปีที่แล้ว

    Best event loop explanation I've ever seen. Microtasks are not getting enough attention these days, and this guys just makes it look so simple

  • @MiltonSosa
    @MiltonSosa 7 ปีที่แล้ว +1

    Amazing explanation on how event-loop, RAF and micro-tasks works!

  • @afca25
    @afca25 2 ปีที่แล้ว

    That piano bit was straight up Larry David-esque humor and I loved it!

  • @raymondyoo5461
    @raymondyoo5461 2 ปีที่แล้ว

    wow great lecture. Talking about deep and complex notions in such a concise tone, thanks for your great presentation

  • @nikosc
    @nikosc 5 ปีที่แล้ว +1

    Wow. After that talk I used many blogs and MDN docs to fully understand these topics.

  • @dima9740
    @dima9740 6 ปีที่แล้ว +1

    Oh my gosh, that's very simple, clear and informative. Great speaker, great presentation.

  • @sgwatyt
    @sgwatyt 7 ปีที่แล้ว +200

    The main Fred.

    • @jakearchibald
      @jakearchibald 6 ปีที่แล้ว +25

      I find it very difficult to discuss the movie Thor.

    • @omarflores4234
      @omarflores4234 5 ปีที่แล้ว +4

      i cannot unhear this hahaha

    • @hobbyturystaSEO
      @hobbyturystaSEO 4 ปีที่แล้ว +1

      :D

  • @mweb7344
    @mweb7344 3 ปีที่แล้ว +2

    that looks and sounds like a real world Sheldon, Great talk !!

  • @Han-ve8uh
    @Han-ve8uh 2 ปีที่แล้ว

    At 26:32 "we get our mutation observer callback". Where is it? This code block looks exactly the same as code at 25:10 generating 200 events. What's the code change done that defines/uses these mutation observer callbacks?

  • @afca25
    @afca25 2 ปีที่แล้ว

    That's a tough crowd if i've ever seen one... My man is killing it there!!

  • @cli23
    @cli23 3 ปีที่แล้ว

    Amazing talk in so many ways. Incredible speaker, slides and diagrams, and content.

  • @__azt
    @__azt 5 ปีที่แล้ว +1

    Wow! That is one of the most informative talks I ever heard.

  • @ShahriarAnwar
    @ShahriarAnwar 7 ปีที่แล้ว +26

    Just AWESOME. Jake you're my man.

  • @Gelio1234
    @Gelio1234 7 ปีที่แล้ว +1

    What a great talk! So much useful information presented in a convenient and easy to understand way

  • @Retrofire-47
    @Retrofire-47 2 ปีที่แล้ว

    23:38 fyi this is not a bug, it is a hardware limitation. the browser cannot predict when the monitor is going to refresh, in order to do that it would need to accurately predict quantum mechanics. the paint event occurring AFTER the monitor refreshes means absolutely nothing because the monitor has already refreshed.. when rAF executes its callback that can only happen after the OS detects that the monitor has refreshed aka you will need to wait until the next frame refresh for paint regardless, whether the paint event is before or after makes no difference, you will always experience up to 33.2ms of measurable input lag.. unless you incorporate some kind of unique predictive technology to predict when the monitor will refresh THEN update the appropriate data to change rasterization, but that is subject to error

    • @jakearchibald
      @jakearchibald 2 ปีที่แล้ว

      It is a bug, and it's been fixed

  • @AmnonSadeh
    @AmnonSadeh 3 ปีที่แล้ว +1

    5:25 "Are the arguments in the wrong order?"
    No, because 'callback' is mandatory, but 'ms' is optional. This is valid JS: setTimeout(callback);

    • @jakearchibald
      @jakearchibald 3 ปีที่แล้ว +2

      True, but the API would be better if ms was not optional, and was the first parameter.

    • @DonaldFranciszekTusk
      @DonaldFranciszekTusk 10 หลายเดือนก่อน

      @@jakearchibaldWhy?

    • @jakearchibald
      @jakearchibald 10 หลายเดือนก่อน

      @@DonaldFranciszekTusk What's the benefit of ms being optional?

  • @feihcsim7045
    @feihcsim7045 7 ปีที่แล้ว +5

    my man jake killing it again

  • @juremd
    @juremd 4 ปีที่แล้ว

    Great explanation, though the description mentions bits about requestIdleCallback which I did not notice.

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +2

      Hah, that's because conferences often ask for an abstract before the talk is written. requestIdleCallback isn't that interesting, it just queues a task when it thinks the user is idle.

  • @jasonsebring3983
    @jasonsebring3983 5 ปีที่แล้ว +1

    I feel like I just started learning this stuff and I've been doing it for so long. Amazing!

  • @amanmavai99
    @amanmavai99 ปีที่แล้ว

    one of the best talks I have ever seen. !!

  • @Lavasea
    @Lavasea 4 ปีที่แล้ว

    This was an amazing talk, the visuals really helped produce a mental image of what goes on in the event loop at any given time.

  • @s3340985
    @s3340985 3 ปีที่แล้ว +4

    Great humor, tough crowd :) But honestly, very informative, thank you!

  • @mryechkin
    @mryechkin 4 ปีที่แล้ว +1

    Man.. tough crowd! This was a great talk

  • @stackdeveloper6614
    @stackdeveloper6614 ปีที่แล้ว

    My life as a developer changed after this talk!

  • @yongzeyao1337
    @yongzeyao1337 5 ปีที่แล้ว +3

    I think I'm just gonna master JavaScript/TypeScript, Vue.js for now. As a developer, I personally think depth is much more important than breadth.

    • @afeez.awoyemi
      @afeez.awoyemi 5 ปีที่แล้ว

      I love VueJS. And I think Javascript is pretty cool generally :)

  • @forceboxed
    @forceboxed 2 ปีที่แล้ว

    17:38
    Is that REALLY so neat and tidy, though?
    In frame 1/3, that big yellow task has pushed render much further down, closer to frame 2/3's render.
    How far can this be pushed i.e. can a longer task make the yellow box big enough for the purple+green to not fit in the frame, essentially causing jank for that frame?

  • @lipeiye
    @lipeiye 11 หลายเดือนก่อน

    When I use the 22:15 code to execute, my effect is inconsistent with the video.
    It stopped while moving towards 1000px and stopped at 500px.
    I think this is caused by changing the transform to 'translateX(500px)'; in the second task cycle.
    Is what I said correct?
    ```
    const button = document.getElementById('btn');
    const box = document.getElementById('box');
    button.addEventListener('click',()=>{
    box.style.transform='translateX(1000px)';
    box.style.transition='transform 1s ease-in-out';
    requestAnimationFrame(()=>{
    requestAnimationFrame(()=>{
    box.style.transform='translateX(500px)';
    })
    })
    })
    ```

  • @devmenezes
    @devmenezes 4 วันที่ผ่านมา

    What a masterclass. I would like to know if there is something like this about the (in-depth) rendering process. I became interested after this one. Thanks.

  • @sudeep.g
    @sudeep.g 5 ปีที่แล้ว

    One of the best talks I have ever seen!

  • @nukebarbarbarian3735
    @nukebarbarbarian3735 ปีที่แล้ว

    This is the best video on event loop so clear!

  • @RubenMiquelino
    @RubenMiquelino 3 ปีที่แล้ว +3

    fucking amazing. i wish every talker has this kind of humor

  • @EduardoWeidmanBarijan
    @EduardoWeidmanBarijan 2 ปีที่แล้ว

    That was easy to follow even though I get stuck a lot when it comes to frontend programming. Good job.

  • @priyankamalviya3927
    @priyankamalviya3927 5 ปีที่แล้ว +1

    22:22 I got why it dint work earlier, but why does raf within raf work correctly though?

    • @ChetanLakhanpal1
      @ChetanLakhanpal1 5 ปีที่แล้ว

      I guess that will be queued for next event loop cycle.

  • @pradeepbetty
    @pradeepbetty ปีที่แล้ว

    Watching him is like watching myself in the mirror 😄
    it always bugged me how setTimeout's timeout is at the last,...

  • @xerxius5446
    @xerxius5446 5 ปีที่แล้ว +11

    Finally, a JS expert with a sense of humor !

  • @yonoseespanol
    @yonoseespanol 3 ปีที่แล้ว +2

    For those who find this incredibly interesting, Jake and Surma have a talk show called HTTP 203

  • @SafetyLast-_-
    @SafetyLast-_- 3 ปีที่แล้ว

    The best explanation of the Event Loop out there 👍

  • @JulianSloman
    @JulianSloman 6 ปีที่แล้ว +2

    That laughter at the end "back to the studio" :D

  • @waldemarenns4874
    @waldemarenns4874 4 ปีที่แล้ว +1

    A classical Archibald. Great talk!

  • @nvrp
    @nvrp 2 ปีที่แล้ว

    Please add Laughter Tracks!
    I stress when good jokes arent rewarded with good laughter!
    "I stress about things that arent really problems.
    I stress about things that have nothing to do with me"

  • @n4vyblueyes
    @n4vyblueyes 4 ปีที่แล้ว

    Does anyone understand why at 31:37 that `button.click()` changes the order of operation from L1M1L2M2 to L1L2M1M2?

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว

      Because the call to button.click() stays in the JS stack, so the JS stack doesn't empty between listeners. The microtask queue empties when the JS stack empties.

    • @n4vyblueyes
      @n4vyblueyes 4 ปีที่แล้ว

      @@jakearchibald thanks

  • @KaranSheth
    @KaranSheth 4 ปีที่แล้ว

    This is so good! Its like Simon Amstell coming to teach me about javascript stuff!