Web Dev Trivia Showdown! Can You Beat the Experts? JavaScript, CSS, and perf

preview_player
Показать описание

------------------------------------------------------------------------------
Hit us up on Socials!

#webdevelopment #webdeveloper #javascript #syntax #syntaxfm #webdev
Рекомендации по теме
Комментарии
Автор

scott betting his entire points is a chad move. respect!

kasper
Автор

Well, if you're saying that Event Loop is not a JS feature, we should probably acknowledge that Web Workers isn't either. It's a runtime feature.

DevTones
Автор

Love the banter. Great video as always

phishbacon
Автор

I totally agree with Wes, the correct answer had to be The Event Loop.

josealfa
Автор

This was a great episode, thank you as always!

SpaceChicken
Автор

I love that series. Please continue with it.

kuschelbaercgn
Автор

I love the Friday videos! I’m dying at the end with Wes saying “you should’ve lose a point for choosing Web Workers” lmao

ohLyln
Автор

The event loop is a feature of the language (ie: a reason you would choose the language over another technology when deciding on a stack). All of the others are concurrency management features of the specs (either the language spec, or the BOM spec), and all of those spec features rely on the runtime characteristic (that being the event loop) to function.

With that said, Wes’ choice of Promise is the *least* non-blocking of the bunch, because if synchronously resolved, it goes on the microtask queue, which gets flushed *before* deferring to the host, which will then process the callstack for the next tick (if it exists). This means that even if it doesn't block the main thread, it's still happening *before* responding to any event that has happened.

There are even worse options, like the non-standard setImmediate, which creates a whole new callstack and a whole new microtask queue which are flushed before deferring to the host... (friends don't let friends use setImmediate). Oh, and concurrent channel event handling (postMessage) between "threads" happens after the microtask queue, and before deferring, as well.

That would make for some fun trivia, now that you have the cheat sheet.

SeanJMay
Автор

Event loop is the core language feature that allows JS to have non-blocking I/O. Maybe adding "Core" would've made it more accurate.

j.r.r.tolkien
Автор

The event loop is part of the runtime, browsers and node, bun, deno all implement a runtime that runs an event loop. There are js implementations that do not provide an event loop and thus stuff like promises don’t work right even though they are part of the language (ex: goja)

The event loop is what allows non blocking io by formalizing a way of chunking computation into tasks and have those tasks be offloaded to other threads.

Outside of js, projects like the nginx webserver or the tokio runtime in rust use event loops to achieve the same thing.

(First YouTube comment ever, this one triggered me) 😂

monvillalon
Автор

Agreed: Love the Friday videos! The answer to the last question was a little obvious by elimination: It was a fairly complex selector and there was only one complex answer 🤣.

trinkel
Автор

Isn't Event Loop part of run time, same with Web Workers, and setTimeout, but Promised are "JavaScript" Features?

DivjotSingh
Автор

As a Firefox user and regular redditor I feel attacked 😂

TheAlexLichter
Автор

My understanding is that web workers don't have access to I/O directly, they have to communicate with the main thread to get access to events or alter the DOM. They are great for spinning up concurrent processing, however.

KevinDamm
Автор

scott went all in and won the pot lmao

ashraymallesh
Автор

This was fun to watch. In the last question, Wes didn’t show work 😂

youpele
Автор

CJ, you can't let them beat you come on 😮

Stoney_Eagle
Автор

I'm a software engineering student and starting to learn JS full stack development but here in Gaza we don't have any chances, so where can I get training to have experience??

MohammedYazji-gd
Автор

Event Loop allows non-blocking IO
Web Workers allows non-blocking everything, including CPU operations (which event loop doesn't allow)

BillyBraga
Автор

I love bun, but sometimes it seems like docker doesn't like it? I probably messed something up but I've had issues a couple of times.

ShootingUtah
welcome to shbcf.ru