Javascript Closure Tutorial | Closures Explained

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

In this Javascript Closure Tutorial you will learn the concept of closure through multiple examples. Closures explained in this way may be easier to understand. Closure is often confused with lexical scope which is an important part of closure, but it is not closure itself.

Javascript Closure Tutorial | Closures Explained

(0:00) Intro
(0:13) Example 1: Lexical Scope is not Closure / Closure Basics
(9:55) Example 2: Closure with an IIFE
(13:46) Example 3: Closure with an IIFE and a parameter

✅ Follow Me:

Was this tutorial about Javascript Closures helpful? If so, please share. Let me know your thoughts in the comments.

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

Out of all the yt tutorials on closures I've watched today, this one's been by far the best. Clearly explained step-by-step with readable code as illustration. Calm voice, proper English pronunciation and slow pace of speaking matter particularly to beginners like me. Unlike most teacher-coders on yt, you're actually capable of teaching. Thank you, good job, I'm going to watch more of your tutorials.

ukaszpospiech
Автор

Thank you, Dave! An extremely complex concept was explained clearly. Finally, I understood what closure is and how to use it in my code. The IIFE was a cherry on top. Thank you again.

binadarabzand
Автор

You have a laid back, natural, and clear way of explaining things. Much appreciated!

adventurer
Автор

You explained closures in a way that even a primary school student will understand. You definitely deserve a sub. Thank You so much, Dave!

captainalpha
Автор

I spent the whole day looking up videos to understand closure, and finally I could find the best one. Thank you so much.

aya
Автор

Dave grey taught me html and css! Now he's teaching me one of the javascript topics I find hard to understand! I love this guy, he's the best!!

knoiohi
Автор

I spent the whole day looking up videos to understand closure. finally i git it so Thank you so much for clearly and simply explaining

khaledbenshible
Автор

I was writing closure example after example without really understanding the reason behind it and this video with credit example finally got the closure idea to click. Thank You.

m-ok-
Автор

This is the first video I've come across, so far, that really goes deep into clearly explaining that simply having an inner function and logging its parents' variables isn't a closure but a lexical scope. Brilliant!

nirmalshah
Автор

I can't tell you how much I appreciate the pace of your speaking voice when explaining these concepts. So many of these youtube videos, the person is talking insanely fast, and I cannot keep up with all of it.

jim_andrus
Автор

Just learned closure several days ago. This video definitely helped me review the concept. It also helped me clear up the confusion about lexical scope. Thanks Dave!

SC-bvkx
Автор

Finally I fully understood closure.... thank you and bless you

MasPensador
Автор

I discovered you today, Dave and I am highly impressed with your teaching style. Unlike many other YT videos that teach all this stuff, I can actually understand you. (So many are hard to follow due to the thick accent of the instructor.) I'm looking forward to delving into other videos you have. Thank you!

jennisonb
Автор

The majority of videos made by other content educational creators across various websites talk like they're rappers, you sir are different. Things went much clearer after this video and made me realize that the majority of my confusion is because most of my searches were actually lexical scopes and not closures.

I really am indebted to you.

ichiroutakashima
Автор

I have smashed that like button and I hope that this playlist keeps growing as these concepts really make a difference. Thank you for sharing your knowledge with us

arescatalin
Автор

Dave, you need to seriously consider putting together a Javascript course with projects for Udemy. Your explanations are crystal clear. I have found myself doing course after course, stopping, and then trying to find someone else who would be able to explain the concept a bit clearer than the instructor. It wastes a lot of time. I have found myself coming here for the past three or so concepts, and they click straight away. So thank you.

DLeRoux
Автор

Just a quick thought.
I think the "credits =- 1" line should be at the end of the function since we need to check credits' amount first to evaluate the possibility of playing. In the example we should be able to play 3 times and it only allows two plays.
Everything aside, great video and I always find your explanations very helpful!

je
Автор

Thank you very much, Dave. You explained it in a very beautiful way possible. You know I had been struggling from this since long. There wasn't any such explanation on the internet! Thanks a lot.

umairyatoo
Автор

i watched too many closure videos but first time i understand clearly . thank you so much

mertasilturk
Автор

Thank you so much for clearly and simply explaining this concept!

stephaniezun
join shbcf.ru