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".
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
@Yoshita Jain Thanks for making it so simple.You making every topic so easy in js.
great explanation
👍👍👍
Great mam
Great ❤
Keep growing. Very informative ❤️🔥
Are you very good explain
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
very nice video
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.
Lots of love from 🇵🇰
You explain very well mam
Thank you ❤️
Great
Mam make a video on lexical environment and shadowing
please make advanced javascript series your videos are the best
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