This is the first visual example of showing how let is different from var. Thanks for sharing this!
@Techsithtube4 жыл бұрын
Glad it was helpful!
@ravikumaryazali25294 жыл бұрын
I can proudly say that watching your JavaScript videos changed my knowledge level from beginner to medium, I know JS is like an ocean. Waiting on more n more videos from you. Thanking you is not just enough though
@Techsithtube4 жыл бұрын
Great to hear! I will keep putting more such videos.
@mptakable2 жыл бұрын
Thanks man for explaining a setTimeout inside for a loop with a var. It's priceless 👌🏻
@timfrailey14926 жыл бұрын
Have read tons of closure examples and tutorials and I feel like have had a good understanding of them, but no one really broke it down in the way you did with each loop iteration. That is really the key to understanding why things are happening as they are. Great tutorial -- all of your videos are awesome
@Techsithtube6 жыл бұрын
Tim, I am glad that you leaned from it. Thanks for watching
@cooldezign2 жыл бұрын
Your explanation is crystal clear !!!
@rick_from_yr6 жыл бұрын
Seriously, the best tutorial I've ever seen about closures :D
@abhilashvadnala58653 жыл бұрын
I felt Akshay Saini's closure video is the best
@zt.56774 жыл бұрын
I saw your Javascript Closure tutorial ( Closures Explained ) from 2015 as well. Both of them are very good. Thank you for keeping both of them.
@flyingbirds42356 жыл бұрын
I started learning JS because of techsith.
@Techsithtube6 жыл бұрын
I am glad you did. Thanks for watching!
@phalguniroy33515 жыл бұрын
@@Techsithtube me too. JavaScript seems very much clear after your videos.
@shivGGG4 жыл бұрын
You are amazing, Guru
@achyutrastogi80805 жыл бұрын
Awesome, it's not the most complete video, but it explains a lot that most closure videos don't. Good job.
@kshitizshah66853 жыл бұрын
He has got guts and confidence , Salute !
@Techsithtube3 жыл бұрын
Kshitiz, thanks for an awesome comment!
@murrayKorir6 жыл бұрын
OmG this man is the man... I was using for loop with multiple queries inside it and several other callbacks, then at the end I had put a condition to check that the loop had finished, then finalize with a last update query..so the loop always ended before even the queries had finished processing what ta ef man!! it drove me crazy for days checked on stack overflow for solutions but those solutions were just too thick to understand so I found techsith, he explains it very well and made it look so easy. Thanks a lot of this. subscribed, liked and shared. The example with setTimeout() was a mind opener I was able to see the entire code universe, everything now made sense. wonderful work.
@Techsithtube6 жыл бұрын
Carlos, I am glad that you finally got it. Please check it out my video on async await, that can be very useful. Thanks for watching!
@scbu926 жыл бұрын
I was always confused by the setTimeout with closures. Thank you for finally clearing that up for me!
@Techsithtube6 жыл бұрын
I am glad you got it. Thanks for watching!
@momithachoubey7864 жыл бұрын
@@Techsithtube hello.... Can u really provide ur JavaScript tutorial to us, full course??? PLEASE...🙏🙏🙏 BTW LEMME TELL U I AM A BIG FAN OF URS... PLEASE PROVIDE ME UR CLASS DETAILS, REALLY WANNA LEARN FROM YOU SIR
@savitrimhatre26364 жыл бұрын
This is the best tutorial ever I have came acrossed to learn Closure, difference between using var and let . I was really looking out for the explanation to the problem which you explained in the later part of the video. Thank you so much for the best explanation.
@shadymohammed31975 жыл бұрын
Every time I watch this video I'd like to like it again! You're an awesome teacher!
@MrBulciu5 жыл бұрын
Woah, nice tutorial! I just found your channel and it is amazing. I didn't even feel those 16 minutes pass while watching. Thanks for making top notch content!
@Techsithtube5 жыл бұрын
I am glad that you learn something . Thanks for watching!
@prakashbalaji23364 жыл бұрын
Thanks a lot...man you cleared the my all the doubts about closures
@Techsithtube4 жыл бұрын
Glad to hear that
@bhanupartapsingh31666 жыл бұрын
bro love love love love u ... it took me time to understand closure loop but end of day ... it is deep understanding knowledge and I am beginner so it's so useful for me .... liked shared ...already subscribed
@Techsithtube6 жыл бұрын
I am glad that you got it in the end. Keep learning! Thanks for subscribing!
@henokgebremedhn18024 жыл бұрын
Best tutorial about closures by far, Thank you.
@muneerahmad14286 жыл бұрын
i liked it before watching it even before you said to "like it before watching it", as i have watched few JS tutorials on your channel in last few hours ,, cant resist clicking the "Like" button and yeah i am a subscriber now,,, Thank you so much for your efforts, #RespectForYou
@zakiahmed31984 жыл бұрын
your videos are such incredible js tutorial i have ever seen in youtube
@Techsithtube4 жыл бұрын
Glad you like them! Thank for watching!
@Karan601916 жыл бұрын
wow that var and let concept for closures gave me goosebumps, well done Mr. Patel :)
@sagarshekhar62965 жыл бұрын
I am new to Advanced JS....and I liked this video....Thanks
@Techsithtube5 жыл бұрын
Thanks for a comment Sagar. :)
@xxdreadsaintxx5 жыл бұрын
Mind blown! Never would have thought to look at it that way
@Techsithtube4 жыл бұрын
:) Thanks for watching Justin.
@ankitapagaria86104 жыл бұрын
I've seen so many definitions for closures but never really understood it. This video cleared a lot of doubts for me. Thank you!
@Techsithtube4 жыл бұрын
Glad it was helpful!
@coplepk043 жыл бұрын
Great explanation of closures
@priteshm68234 жыл бұрын
your videos make learning super easy. Thanks man
@suprajakoppisetty82316 жыл бұрын
Awesome, I have been struggling to understand many concepts and your tutorials are life savers! :D
@Techsithtube6 жыл бұрын
I am glad that they helped you . Thanks for watching!
@daliborkozar8703 жыл бұрын
I advanced in JS and working in react and I just forget things, this is a great refresher
@Techsithtube3 жыл бұрын
I am glad that you think so . Keep on learning!
@cancanjaker16204 жыл бұрын
Very good explanation of closure from a new perspective.
@sahityavemparala20992 жыл бұрын
excellent closure explanation...
@murugesansubban5 жыл бұрын
You are a good teacher.. I learnt a lot from you.. thanks
@Techsithtube5 жыл бұрын
Thank you for an awesome comment Murugesan.
@ravimane55083 жыл бұрын
I am following techsith from last 2 years. Please make a tutorial series and add more videos on Javascript.
@aishwersharma81306 жыл бұрын
Thanks.Your effort deserves a bigggg like.
@prasadambaledath76995 жыл бұрын
Wow , what an explanation about 'Closures' ! clear and precise !! Thanks a lot techsith !
@saurabhjarande55854 жыл бұрын
Thank you Sir. You explanation and topics r very nice. It actually helps.
@ravindrakumarambati91944 жыл бұрын
I like the way u explained . Thanks
@Techsithtube4 жыл бұрын
Thanks for liking
@upendrakumarpandit53402 жыл бұрын
thanks , you realy keeps your words whatever you said at the begining of lecture.
@diwakarnrp20926 жыл бұрын
Your explanation is super sir
@himanshusharma31575 жыл бұрын
First half summary: "closure is a function which remembers its dependencies, so that it can be used outside of containing function." pretty simple... Second half summary (after for loop): it was about difference between var and let keywords. good example to explain scopes. but i din't understand how is related to closures. please explain that.
@satlibwanzai1114 жыл бұрын
It demonstrates how the results of closure are changed by block-scope and function-scope.
@ExtraordinaryAF4 жыл бұрын
You are right. He used closure to show the difference between var and let. var uses functional scope, so the variable 'i' in the closure of the set timeout function keeps getting updated (its the way var works). Let uses block scope, so the variable 'i' in the closure of the set timeout function does not get updated.
@theskydeath4 жыл бұрын
If you look closely, the settimeout function executes a callback at later point in time. And by later point means when the outer function has been already executed and it's variable, i, is not present in the lexical scope, But even then callback can access, value of i and that's the magic of closure.
@MinecraftN3rd4 жыл бұрын
with the var keyword in the set Timeout function, the function always updates to the new value of i. Each of the setTimeout functions update to the new value of i after the for loop is finished, because the I in the setTimeout has function scope, which means the variable is visible only inside the function. Where as with "Let" a new variable is used for each of the SetTimeout functions, so the I isnt updated to 3 at the end like all the others. Think of the run time of the for loop is much less than the setTimeout function.
@milindkhadse5563 жыл бұрын
Very helpful tutorial I don't know this differences. Thank you
@AddictedToCode3874 жыл бұрын
probably the best video about this theme i have found so far, extra , perfect :)
@yanchuntang77503 жыл бұрын
great, best js tutorial ever seen
@lukehatcher984 жыл бұрын
I loved the looping var vs let example
@shohruxdavronbekovich82673 жыл бұрын
Great explanation!!! Thank you for your help!!!
@joesmi86385 жыл бұрын
This is a super good explanation. Thx.
@mmmmmmm87065 жыл бұрын
That's the best video thumbnail I've seen on KZbin! One of the best on closures too.
@Techsithtube5 жыл бұрын
Thanks you . I put lot of thought in each thumbnail .
@purvasawant61696 жыл бұрын
This couldn't be a coincidence that I already liked your video before watching it completely. Time of the video 1:17 seconds, video liked. I wish there was a super like button.
@bharatchirumamilla25284 жыл бұрын
A True Knowledge you share
@avdbzben5 жыл бұрын
You were absolutely right... It was very good
@subhashvishwakarma52034 жыл бұрын
Really awesome ....big thanks to you for such videos
@reynandelizo14804 жыл бұрын
I liked your video your teaching is good and also worth it.
@ramdhenudhunia15075 жыл бұрын
Well explained sir, hats off to you
@mysticaltech4 жыл бұрын
A true JS expert! Thank you.
@Techsithtube4 жыл бұрын
Glad it was helpful!
@sujanmahmud91684 жыл бұрын
Thank you, all of your videos are really good and better descriptive.
@alexbauer11932 жыл бұрын
I loved your video. You're doing a great job.
@dorlinogullari4 жыл бұрын
Inspecting the new function with a console.dir was the key to understanding this. Basically the lexical environment of a function is stored within that function
@dhimanchakraborty56395 жыл бұрын
The best tutorial I have seen ever.
@shourabhkumarraja13713 жыл бұрын
love you sir!!.. you are awesome 🙏
@Techsithtube3 жыл бұрын
Thanks for watching Shourabh!
@kaushalpatel22842 жыл бұрын
Nice explanation 🙏
@deeproy72926 жыл бұрын
you blew my mind with that example...thank you!
@LtKeyser4 жыл бұрын
In any of your tutos I learn some great trick. This console.dir thing is sweet. I'm still learning so I only know that much. Still I haven't seen it anywhere else and I've been doing quite a lot of reading and viewing these days. Good for you.
@bhanubaghel30125 жыл бұрын
every time whenever i see your videos something new is must in your videos what i don't know it's a real tech chennal
@shibnathroy1066 жыл бұрын
Thank you for making such high-quality content available to us for *free* .
@priyankapardeshi65053 жыл бұрын
Good explanation. Thanks
@SumitJaiswalIndore4 жыл бұрын
Great explanation by @ techsith . thanks you for save our time.
@rajabhadariprasadvideos19963 жыл бұрын
the video is so useful to me thank you sir
@cmoney19285 жыл бұрын
Best explanation of this concept I have seen. I always do this but never understood why it worked.
@akshatbhatt40225 жыл бұрын
I liked before watching the video.
@Techsithtube5 жыл бұрын
Thanks Akshat for watching
@anonymous.youtuber4 жыл бұрын
Finally I understand this. Thank you so much ! 🙏🏻
@Techsithtube4 жыл бұрын
Glad it helped!
@Gwith1266 жыл бұрын
Wow, great video and released on my birthday!
@Techsithtube6 жыл бұрын
Happy Belated Birthday! :)
@ruchirai57755 жыл бұрын
Techsith- Genius , thanks for this video
@narsingyadav6676 жыл бұрын
very good teacher, the way you try to explain is awesome
@asitgupta42996 жыл бұрын
Please you be in good mood and keep uploading useful tutorial for us..Well explained ..thnks Sir :)
@climbers13766 жыл бұрын
7:03 block function 7:39 closures only show used variables within specified block function (shown via console.dir) 8:13 articulating closure
@Techsithtube6 жыл бұрын
Thanks for the timeline.
@chapriprogrammer78382 жыл бұрын
Sir you are great😊
@MultiHeywatsup Жыл бұрын
on 12:42, you mentioned we get a brand new 'i'. If thats the case, how does it remember its previous value to increment itself
@j.leonardomora21894 жыл бұрын
Thank you so very much, always had a bad time with closures
@Techsithtube4 жыл бұрын
Happy to help! Thanks for watching!
@jabezsamson3 жыл бұрын
Your explanation is just out of this world! Thanks, man! You helped me a lot!
@Sleepytj0074 жыл бұрын
Thank you for the lessons
@emilewamsteker34126 жыл бұрын
Hey Techsith, Thanks for taking the time do this video. This is a great explanation.
@Techsithtube6 жыл бұрын
I am glad that it helped. Thanks for watching Emile.
@Street_Food_Adventuress4 жыл бұрын
You are absolutely right, I get an interview last week with a closure inside a loop question hahaha
@kmylodarkstar22534 жыл бұрын
Amazing dude. Really thanks, it's so important to learn by theory, examples and then challenges
@Techsithtube4 жыл бұрын
Glad you think so! Fundamentals would take you far.
@peoples_amazing_life4 жыл бұрын
keep it up, sir. just now I have subscribed to your channel.
@AhmedMohammed-gy7mt6 жыл бұрын
What an awesome tutorial I started love JS because of techsith
@Techsithtube6 жыл бұрын
I am glad to have inspired you . Keep learning!
@sanketburde20256 жыл бұрын
Very Good explanation..
@sivahari974 жыл бұрын
For loop - Nice example bro...
@ammujosephshajan24604 жыл бұрын
Super cool and i really loved it
@vivekpadelkar56244 жыл бұрын
great video ...keep working ..............
@Techsithtube4 жыл бұрын
Thank you, I will
@shikharchaudhary69845 жыл бұрын
Amazing explanation.
@deejaydev5 жыл бұрын
Thanks for the vital info
@Techsithtube5 жыл бұрын
Thanks for watching Danjuma,
@TechAahar4 жыл бұрын
Great explanation with clear situations, thank you for sharing with us.
@ramya230419874 жыл бұрын
Very nice 👍 video.
@vivekvanga35886 жыл бұрын
Well explained sir... Thank you
@sunsneez5 жыл бұрын
Love your videos!! They are so helpful. Thank you.
@Techsithtube5 жыл бұрын
thanks for watching Lexi. Keep on learning!
@christianteller6614 жыл бұрын
Great examples, thanks for your time!
@VishnuvardanRS6 жыл бұрын
I am really glad, I found your channel!
@Techsithtube6 жыл бұрын
Thanks for watching Vishnuvardan!
@alvaroprietovideos3 жыл бұрын
Good video! Thanks for sharing
@NihilismEnjoyer985 жыл бұрын
m********r makes it sound so easy!!! XD didn't get the immediately invoked function part at the end but, i'll just dig into it. Thanks for great explanation
@Techsithtube5 жыл бұрын
:) Akshay, I am glad that you got some of the concepts. Keep on learning. I also have a video on immediately invoked function expression. do check it out.