JavaScript Closures in 1 min #shorts #code #javascript #coding #dev #tutorial #js #coder

preview_player
Показать описание
JavaScript Closures Tutorial, FINALLY explained!

Closures are incredibly difficult to explain and understand, and sadly they come up in interviews all the time. Why do we need Closures? And how can you use them to your advantage?

JavaScript Closures from the series "10 Things JS Developers Should Know"

This is episode 9 in a 10 part series I’m calling 10 things javascript developers should know but probably don’t. In this series, we’re going to cover some of the most fundamental and important parts of JavaScript that most of us don’t actually know, and barely touch. Today, for episode 9, we’re talking about JavaScript Closures, what do they actually mean, why they exist, and how to use them. Episode 9: Closures. Let’s go!

#shorts
Рекомендации по теме
Комментарии
Автор

I just now binged through the whole One Minute Coding list. Great content!

mikolots
Автор

5 years of doing JavaScript and I just learned this today.
Thanks buddy.

mukiibipeter
Автор

You know why I love JavaScript so much? You just play around with it and in many points you will see almost every approach makes sense. I have a lot of experience still I learn new tricks while writing in JS

moonmonoar
Автор

Okay, this is the best example I have ever gotten across for closures. Wow.

TheArthurW
Автор

Super sir..Nice and Clear explanation👏

sahiraahamed
Автор

Why are you returning a factory function? I didnt get that! Need to check full video.

sriharsha
Автор

I need closure after learning this now

bernardus
Автор

Great explanation!

A thought: say we have an eventlistener like so:

```
x.addEventListener('mousedown', mouseDownFunc)
x.removeEventListener('mousedown', mouseDownFunc)
```

How can we pass parameters to mouseDownFunc but keep the reference to the exact same function for .add and .remove?

kortes
Автор

Would an anonymous function assigned to a variable not work?

comforth
Автор

ok why not return the body.style.font = fucArg ? Why create another nested fund to do the return that the first fund could have returned?

Runeite
Автор

I got a doubt, a parameter is the one that it's declared to receive what came from outside and the argument it's actually the value send whe you use the function? I'm right?, cause it get me confused 😕

Tsukasa
Автор

Longer information with more what, bro?!.. with more what!?!

FameRK
Автор

Good information cause I understood none

fantasyteamshorts
Автор

watched the long video, didn’t get it. this one worked.
look at me: 36yo and internet gave me ADHD xD

uncopino
Автор

I would mich rather see React closures explained as those break even the JS behavior.
React is garbage, try me and I'll prove you wrong 100% of the time.

shapelessed
Автор

You might be good at coding but 😦😦😦 at explaining JavaScript concepts.

abhinavsharma