JavaScript Interview Series- Var let const in JavaScript | Difference between Var let and Const
HTML-код
- Опубликовано: 21 авг 2024
- Hi guys, in this video we will learn
1- What is var, let and const?
2- why we use let and const and not var?
3- Difference between let, var and const?
******************************************************
#2023 #javascript #js #interview #beginners
Thank you guys for supporting @yoshitajain0812 channel.
Love,
Yoshita :)
Lots of love from 🇵🇰
@Yoshita Jain Thanks for making it so simple.You making every topic so easy in js.
very nice video
great explanation
Keep growing. Very informative ❤️🔥
Great
👍👍👍
Great point!
To add to that, while let and const declarations are hoisted in JavaScript, they are not initialized with a default value of "undefined" like var. Instead, only the declaration is hoisted, and the default initialization does not occur until the variable's actual declaration is reached in the code.
This is why we get a "ReferenceError" if we try to access any variable declared using let and const before its actual declaration in the code.
In contrast, with var, both the declaration and initialization are hoisted, but the variable is initialized to a default value of "undefined".
That is why, when we try to access any variable declared using var before its declaration we get a default value of "undefined".
Before initialisation
Great mam
Great ❤
Are you very good explain
hello mam , can you make a short video on virtual dom , i wasnt able to find it , and mam can you create a video on lifecycle methods and lifecycle hooks which is asked in interview
let and const are also hoisted but in temporal dead zone.
You explain very well mam
Thank you ❤️
Mam make a video on lexical environment and shadowing
Sister ek admin dashboard pe video banai or payment integration pe jisme braintree or stripe dono methods ka use ho raha ho plz
Yoshita 1 correction here, a variable declared using var within a scope COULD be accessed outside it's scope. Please correct me If I'm wrong
very nice video