Programming Tip Of The Day #3: Difference Between VAR and LET in JavaScript in Hindi
2,231 views · Published 18 June 2018 · 12:19 · Indexed 19 November 2026
Channel: Thapa Technical · 2018 · Education
Welcome all, we will see Difference Between VAR and LET in JavaScript in Hindi. Difference between var, let and const in javascript. The difference is scoping. var is scoped to the nearest function block and let is scoped to the nearest enclosing block, which can be smaller than a function block. Both are global if outside any block. Also, variables declared with let are not accessible before they are declared in their enclosing block. As seen in the demo, this will throw a ReferenceError exception. There are some subtle differences -- let scoping behaves more like variable scoping does in more or less any other languages. e.g. It scopes to the enclosing block, They don't exist before they're declared, etc. However it's worth noting that let is only a part of newer Javascript implementations and has varying degrees of browser support. Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines. Don't Forget to Follow me on all Social Network, Instagram Link: https://www.instagram.com/vinodthapa55 Facebook Link: https://www.facebook.com/vinodthapa55 Twitter Link: https://twitter.com/vb55thapa Facebook ThapaTechnical Page Link: https://www.facebook.com/vinodbahadurthapa
More from this channel
-
4:12
C Programming Tutorial - 2 - Comments (Nepali)
-
13:54
C Programming Tutorial - 6 - Unary Operators (Nepali)
-
11:01
C Programming Tutorial - 7 - Use of sizeof() operator (Nepali)
-
12:02
C Programming Tutorial - 9 - Use of Relational Operators(Nepali)
-
4:18
C Programming Tutorial - 10 - If Statement Decision (Nepali)
-
4:50
C Programming Tutorial - 11- If Else Statement (Nepali)
-
3:26
C Programming Tutorial - 12 - Conditional Operator (Nepali)
-
10:21
C Programming Tutorial - 13 - While Loop Statement(Nepali)