whenever I have doubts in JavaScript , I think of techsith 😉
@NishantGupta_Neo6 жыл бұрын
No one has explained Hoisting, let alone the reasons for hoisting in such a lucid manner !
@Techsithtube6 жыл бұрын
I hope it cleared the concept for you . Thanks for watching Nishant!
@NishantGupta_Neo6 жыл бұрын
techsith without a shadow of doubt!
@UrbanBDKNY7 жыл бұрын
Thanks for the video. The best information I got from this video is that let is block scope. That goes a long way towards knowing how to use it and how it is different from var which is function scoped etc
@anacarolinamedeiroslabeca27617 жыл бұрын
Very nice video. Finally understood the issues of using var and the advantage of using ECMAScript 6 'let' keyword instead. Thank you very much!
@Techsithtube7 жыл бұрын
Glad to know. Thanks for watching :)
@mdawadud35205 жыл бұрын
I really appreciate it because it is more clear than all video i get over the internet and please show us a complete video course about zero to advance level. thanks
@Techsithtube5 жыл бұрын
Shiplu I have a full course here udemy.com/js-masterclass/
@himanshushah26836 жыл бұрын
The best explanation in all the tutorials video. not found better than your explain.keep posting, keep sharing .
@Techsithtube6 жыл бұрын
Thanks Himanshu for watching!
@joshrochon62436 жыл бұрын
Wow, hilarious. When you brought up the thing about the interview. Had one today, they asked me about hoisting, and i didn't do so great, and now I'm here
@ankitkumarvashist89915 жыл бұрын
You are a great teacher , i have doubts even after watching other JS tutorial, as they teach the syntax only, not clarifying the doubts why we use any particular syntax what it does. #Love and Respect to you from INDIA.
@Techsithtube5 жыл бұрын
I am glad it helped. THanks for watching and keep learning!
@subhashmahimaluri6 жыл бұрын
You are very good teacher, explained with examples. I have learned lot of things from your tutorials.
@vicentec15216 жыл бұрын
Mozilla needs to hire you to simplify their documentation! Thank you very much!
@justyna61342 жыл бұрын
I like your style of explaining the issues - respect ! Thank you !!!
@arpitdubey175 жыл бұрын
i really appreciate your work....and your teaching skill are awesome....simple and easy to learn by you.....................thank you so much..........
@piashmehedi6 жыл бұрын
techsith is simply best for javascipt :)
@gaurab12477 жыл бұрын
Thanks for making ours life tremendously easy.I have been watching all of your's tutorials and you have a great teacher in you.Keep it up.It would be great if you come up with some DS/Algo tutorial as well.
@krishnat97676 жыл бұрын
Excellent..simple and straightforward..
@AmeerHamza-jy5ml5 жыл бұрын
Thnaks Respected Sir 🤗 Lot of Love from PAK
@Techsithtube5 жыл бұрын
Keep on learning brother and thanks for the kind comment.
@vinodhpaul38706 жыл бұрын
I really love the way you explain the most confusing concepts in js...Feels like you have the right choice of words that trigger my brain to understand..lol. I will make sure to follow your vids regularly. Keep posting cheers!!!!
@souravsuman26334 жыл бұрын
It was very helpful sir ....... explanation was clear and perfect....
@mahesh823987 жыл бұрын
Best clarification of let and const keywords, i have seen so far. Thanks Sir :)
@Techsithtube7 жыл бұрын
Thanks :)
@ahmedboutaraa87715 жыл бұрын
your tutorials are art int itself
@indrajitmate29046 жыл бұрын
Best simple n most understandable concept .....
@anishvijay64453 жыл бұрын
I really enjoyed the video and understood all the concepts related hoisting and issues of constants
@BigMoneySniper7 жыл бұрын
Your unbelievable man.... Straight up unbelievable. God has blessed us with hell of a JS Guru. I wont take this blessing for granted. Unbelievable should be your nickname brotha. Keep up the amazing work.
@Techsithtube7 жыл бұрын
Thank you for watching! :)
@MajidEltayebZ4 жыл бұрын
Thanks for your simple explanation, this really means you understand what you're talking about, keep going (Y).
@tranhuy23047 жыл бұрын
thank you for covering this, its really clear out everything i want to know. So near the end of the video when you declare the var y = 2 outside the function expression even though inside the function it already had the console.log for y before we initialize the y with 1 so thats when the hoisting kicked in rather than the lexicial scope rule where every outer environment can be accessed inside function so in this case the hoisting just declare the variable y and not initialize any value for the variable y so in this case undefined. So far i think javascript is the only language that one declare a variable in a global scope you can literally use it almost any where, javascript function is also an object itself. It would be nice to see you explain about the scope chain and closure🤔🤔But keep up the good work bro
@Techsithtube7 жыл бұрын
I do have a video on both scope chain and closures. you can check it out. Thanks for watching!
@pramodkumarw6 жыл бұрын
Awesome example with simple explanation and presentation
@Techsithtube6 жыл бұрын
Thanks for watching Pramod!
@Pm803345 жыл бұрын
Best in business , fantastic to say the least▶️
@Techsithtube5 жыл бұрын
Thanks Prasad for watching and an Awesome comment.
@TheSuyashgupta4 жыл бұрын
felt happy after seeing the video, doubt cleared
@Carl-yu6uw5 жыл бұрын
Mr T Sith, so clear, so useful, so thank you!
@damoon_az24657 жыл бұрын
Great explanations, your video made hoisting much easier to understand:)
@Techsithtube7 жыл бұрын
Thanks for watching! :)
@vishnum97472 жыл бұрын
Your videos are so informative keep uploading new videos
@shashankpandey10195 жыл бұрын
Really a great tutorial , I have ever seen.
@shyam123m5 жыл бұрын
Simple and perfect explanation. Thanks Sir.
@NihilismEnjoyer985 жыл бұрын
Who... Who... Would dislike this great video XD... The condition could be they didn't want to learn anything XD .... Great explanation as always!
@Techsithtube5 жыл бұрын
Thanks buddy. I appreciate the comment. Thanks for watching!
@neilpearce6 жыл бұрын
It's during the execution context, the JS engine will store all variable and function declarations in memory. Every function creates its own execution context and memory bank. That's why you can call/evoke a function before it is defined, because that declaration has already been stored. ;-)
@Techsithtube6 жыл бұрын
yes, perfectly explained. :)
@salmanmoin35885 жыл бұрын
very nicely defined, pls keep on doing advanced JS topics incl arrow fn etc.
@Techsithtube5 жыл бұрын
salman , I have tones of topics on JS inducing arrow functions and advance JavaScript. please check it out. THanks for watching!
@heshankumarasinghe31594 жыл бұрын
Thank you. This video has been really helpful. I learnt new things......
@Techsithtube4 жыл бұрын
Glad it was helpful! Thanks for watching!
@vohoangan61214 жыл бұрын
Well explain so easy to understand, thank you so much
@abhaysehgal54577 жыл бұрын
awesome video sir....just one advice i want to give you please put this video in top of this playlist...as i started watching your playlist and in above videos you have used "let" then for finding difference between var and let takes a lot of time...but after watching this video i get completely understand the difference between these two...once again thank you so much...waiting for more videos :)
@edwinrodriguez90255 жыл бұрын
great explanation about the scopes. Thanks
@davitjanashia93444 жыл бұрын
Very clear and intelligent explanation! Thank you! 💡 👍🏻
@83manosar2 жыл бұрын
yes bro
@redeeshrv33196 жыл бұрын
Superb !!! Please do some videos on JavaScript common patterns
@Techsithtube6 жыл бұрын
I do have plans for that. Will start making them soon.
@rakeshpatidar44267 жыл бұрын
It's amazing, The way of representation is awesome.
@Techsithtube7 жыл бұрын
Thanks for watching ! :)
@mohamedelhousany49605 жыл бұрын
you are good resource to learn js
@quarter-lifecrisis51274 жыл бұрын
so simple and informative ❤👍🏻 thank you
@swathikumar30744 жыл бұрын
whenever create any variable with var keyword it will be added to window (dom) object directly so it will be available in that particular context var is like global variable. var v; console.log(window.v);-->u will get undefined not an error
@faisaltalukder54252 жыл бұрын
Effective Vedio for learning ✅
@xuelianwang53006 жыл бұрын
Super Clear! Thank you!
@yanivsalman96857 жыл бұрын
this is the best video on that subject. i think you should do some udemy curses so you will se some money of your work!
@Techsithtube7 жыл бұрын
Thanks . I am thinking of building a udemy course.
@amanueltadesse16555 жыл бұрын
the best place to look things
@shikharchaudhary69845 жыл бұрын
Best explanation.
@angelcaru5 жыл бұрын
Another thing with var and let is: var x = x; gives you a variable x with the value of undefined but let x = x gives you Uncaught ReferenceError: Cannot access 'x' before initialization at whateveryourfileis.js:whateverthelinenumberis:whateverthecolumnnumberis
@chirashankar44954 жыл бұрын
Can you please explain the second part where you assign 2 to var y and then if you comment out the other assignment to the same variable the console.log would display 2.
@dhilipkumar58676 жыл бұрын
Nice explanation..keep doing the good work
@100krishna1007 жыл бұрын
Thanks for the video. Can I know the difference between lexical scoping and function Closures?
@Techsithtube7 жыл бұрын
lexical scoping means variable defined outside the function is available inside. Function closure is , when a function uses a variable defined outside because of the lexical scoping, it will hold it inside a thing call closure ( internally) , so if you return this function it will persists the value where ever its used. I do have few tutorials on it. one is called closure, another is function chaining and there is also a tutorial on function mixins which uses closures.
@Dipenparmar125 жыл бұрын
Great work... keep it up 💪😄😃
@Techsithtube5 жыл бұрын
Thanks for watching buddy
@anupsingh247 жыл бұрын
Great video buddy, cleared my doubts.
@mustaphag7 жыл бұрын
Excellent Video. Keep up the good job
@parasmaniseth78733 жыл бұрын
Interviewer : do u watch techsith Me: yes Interviewer : you are hired
@Techsithtube3 жыл бұрын
I hope that did really happened :)
@parasmaniseth78733 жыл бұрын
I have mentioned ur channel in the interview and got to know that interviewer also follows u🤪
@prostoLelouch7 жыл бұрын
Thanks for this tutorial! You did a great job!
@Techsithtube7 жыл бұрын
Thanks for watching!
@hemantgajbe83665 жыл бұрын
Thank you Sir for clearing concepts !!
@manojkumarganigapeta29666 жыл бұрын
nice video it's really helping to me thanks sir , have you done any video on design patterns in javascript sir?
@Techsithtube6 жыл бұрын
I am using design patterns in many places. Here are some of the videos. call, apply and bind: kzbin.info?o=U&video_id=AYVYxezrMWA Decorator pattern: kzbin.info/www/bejne/lWnagJebZsuge68 Factory Pattern: kzbin.info/www/bejne/eqGqpnd8gJmrqdU
@utkarshkandpal59606 жыл бұрын
Your videos are Vader Level!
@Techsithtube6 жыл бұрын
the best way to explain the dark side of JavaScript :)
@sahilarora71864 жыл бұрын
That was clean sir. Thank you
@rohil30234 жыл бұрын
This helped me understand hoisting thanks alot :)
@catherinecordova5126 жыл бұрын
This was so clear and helpful! Thank you!!!
@Techsithtube6 жыл бұрын
Thanks for watching Catherine! :)
@vishalprajapti35444 жыл бұрын
Very helpful tutorial....
@Paunitza3 жыл бұрын
Great explanation. Thank you!
@Techsithtube3 жыл бұрын
Glad it was helpful! Thanks for watching!
@nobir982 жыл бұрын
I think 'let' do hoisting but it doesn't assign to default value undefined. it assign where the developer declared. I might be wrong though
@davideugene79117 жыл бұрын
Merci beaucoup. C'était très clair :)
@Techsithtube7 жыл бұрын
Merci d'avoir regardé :)
@davideugene79117 жыл бұрын
:) So you speak French?
@Techsithtube7 жыл бұрын
Little bit. Few years ago, I stayed in Paris for few months. That's when I learnt french.
@YOUTUBE_IS_WOKE4 жыл бұрын
great explanation, thank you.
@woofwoofunited6 жыл бұрын
Well explained, thank you. Is there ever a usecase where you would rather use var instead of let?
@Techsithtube6 жыл бұрын
You should not use 'var' at all . its anipattern.
@woofwoofunited6 жыл бұрын
Thanks I use const or let instead, from experience though has there been a usecase where var is preferred to let. Im assuming no?
@Techsithtube6 жыл бұрын
yes use let or const , and never use var.
@woofwoofunited6 жыл бұрын
Thank you, well done on making such a good video!
@naren66667 жыл бұрын
Awesome tutorials...
@ashwinichougale34323 жыл бұрын
Very nice video.
@Techsithtube3 жыл бұрын
Thank you very much!
@specsbattle13405 жыл бұрын
Yep this was in my interview today lol.
@Techsithtube5 жыл бұрын
Hope you answered it correctly. . :)
@specsbattle13405 жыл бұрын
@@Techsithtube not quiet, I was not too clear about the var behavior in functional scope vs block scope. Now I am much more clear on this topic thanks to you. I also watched and liked your setTimeout with var and let, that was the exact question she asked. I am also making videos on my channel about tech interviews, I think the best way to learn is to teach. Now I am more confident to go to any UI interviews because as far as I know, scope questions always come up and now I should able to explain the weird behavior of var.
@jacksto1235 жыл бұрын
Thanks for the video. Is var still used often? Or is everyone using let and const now?
@Techsithtube5 жыл бұрын
I think you should only use let and const. now that most browsers supports it.
@AngeliqueGia5 жыл бұрын
Best tutorial! Thanks
@Techsithtube5 жыл бұрын
Thanks for watching Gia:)
@DominicVictoria5 жыл бұрын
Uhm. Are they really garbage collected? How does function factories work then? doesn't function factories return a reference of an object that was created inside the factory?
@codeative6 жыл бұрын
You're amazing .. thank you
@satyendrakannaujiya1876 жыл бұрын
Thanks great tutorial
@ganapathilana70693 жыл бұрын
clear example. thanks
@av52265 жыл бұрын
can someone explain the interview question ? why is y not 2 ? because of hoisting ??
@volodymyrkhimiak14607 жыл бұрын
ДЯКУЮ!!! It is "Thank you" in Ukrainian!
@Techsithtube7 жыл бұрын
धन्यवाद in hindi. Thanks for watching!
@ScienceExploration1015 жыл бұрын
Ur the best
@Techsithtube5 жыл бұрын
Thanks Ankit for a an awesome comment
@alinawaz40345 жыл бұрын
nice Explanation
@shilpasyal556 жыл бұрын
Great Video. Thanks 😊
@legendarygaming77903 жыл бұрын
Great Video.
@customdev70785 жыл бұрын
hey..@techsith what are uses of varaible hoasiting ..
@Techsithtube5 жыл бұрын
There is no use of variable hoisting its one of the side effect of functional scope .
@iqraabdulrauf34025 жыл бұрын
good one
@tathagata10004 жыл бұрын
Good one, thanks
@srikanthuppala82975 жыл бұрын
I understand hoisting. But I want to know why hoisting? Could you please help to understand.
@ajaygaur33926 жыл бұрын
1. We should always use 'let' or 'const' as they have lexical scoping and the code becomes less buggy 2. Hoisting should not be a topic of interviews
@zaibkhan48627 жыл бұрын
Really help me :) Thank you
@Techsithtube7 жыл бұрын
Thanks for watching :)
@akbaralimajeed5 жыл бұрын
Nailed it
@taniamehta96635 жыл бұрын
Let is also doing hoisting If (true) { Console.log (y); Let y= 1; } O/p undefined
@Techsithtube5 жыл бұрын
there is diffrenct between undefined and "not defined error" here you are going to get an error which means that when the line console.log(y) executes there is no y. so it will give an error like "can't access lexical declaration `y' before initialization" Now, in case of var where hoisting happens there wont be an error , the value of y would be undefined.
@rajashekhar4334 жыл бұрын
Looking for more videos on cloud
@kaushikdalvi46416 жыл бұрын
Thank you so much!
@prakharmathur84316 жыл бұрын
good job bro
@Techsithtube6 жыл бұрын
Thanks for watching prakhar.
@gabovanlugo7 жыл бұрын
Awesome!
@Techsithtube7 жыл бұрын
thanks for watching! :)
@konduruashokkumar70906 жыл бұрын
but it's working for me var x=function() { var a=10; } alert(a); x();