Closures Explained in 100 Seconds // Tricky JavaScript Interview Prep

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

#js #programming #100SecondsOfCode

🔗 Resources

🤓 Install the quiz app

🔥 Watch more with Fireship PRO

Use code lORhwXd2 for 25% off your first payment.

🎨 My Editor Settings

- Atom One Dark
- vscode-icons
- Fira Code Font
Рекомендации по теме
Комментарии
Автор

click the f**king button man its his f**king dream😂😁😂

theultimateshield
Автор

"If you ever find yourself faced with a question like this, the best thing you can do is talk through the code slowly and [demonstrate the knowledge you do have], so they know you're on the right track, even if you don't come to the right conclusion." Hands down the best tip for a technical interview of all time.

I've assisted with coding interviews before, and the absolute worst thing you can do is shut up, say nothing, or say "I don't know." Even if you really don't know, show what you do know, ask questions, and try to apply what you have to the problem. That will earn you a tip or a hint or a rhetorical question, and that may lead you to the right answer. When I interviewed for my first job, I got two of three questions mostly wrong, but I was actively participating, asking questions, trying to work things through, etc., so I got the position.

ihavetwofaces
Автор

About the question, it's also tricky that it prints 3 3 3 instead of 2 2 2 since the loop compares i to less than 3 instead of less or equal to 3, but it makes sense considering the i is incremented after the last loop (i++) and the last value evaluated is 3, which is false for the iteration but still a valid value for i

Marcosmapf
Автор

when you said "click the f*ckng button" you had me

jordizweden
Автор

Christian Bale === Closures. Got it Jeff.

devsauce
Автор

the trick question at the end would still log 3 three times even if the setTimeout time was set to zero. setTime is an api that does not run in the current js runtime

jkjoker
Автор

you deserve more than 1 million subs 😊😊

pavanakumardr
Автор

3 years writing JS and I never took the time to look up the diff between let and var. Thank you very much.

KoyFoster
Автор

One day I will watch beyond the 100 seconds, and then I'll get closure

LoveThatSceneChannel
Автор

How convenient. Was working on a memory optimization issue today related to this topic, and here you are nailing it and explaining everything in ~5mins
Thanks 🤘🏼

bilalchami
Автор

JavaScript is a fever dream 👀
Thanks for taking us further down the rabbit hole

kalvinpearce
Автор

This channel is my favourite.
Best content + No bullshit = fireship ❤

gourabmukherjee
Автор

I love your 100 seconds videos, especially when they go beyond 😊. Keep up the good work!

hdni
Автор

This is literally the best video explanation video on closures. I keep coming back to this. This explains why things we take for granted (for ex, debounce in lodash) works. Thanks a lot man.

shivamjhaa
Автор

I don't how you do it but your content is amazing. You sometimes cover subtle details that anyone would overlook.

namanagarwal
Автор

I finally get it! Thanks for always having concise explanations of complex concepts!

DH-quwh
Автор

Your presentations are truly awe-inspiring. Despite their short length, I‘m sure the more thought went into them to extract the bare essence for us to digest, with intentions to pique our interests and to motivate us to go in-depth on our own. The appreciation for your viewers valuable time is reflected though the content‘s succinctness and demonstrates self-awareness in this era of mind regurgitation incentivised by the algorithm.

Arcwise
Автор

Man with this content, you deserve millions of subscribers!

mayanxoni
Автор

Been trying to understand closures for ages and this video taught me them in 5min well worth it. Thanks.

Computeshorts
Автор

This is one of the best channels, short & to the point.

cryptodive