JavaScript Interview Series- Var let const in JavaScript | Difference between Var let and Const

Sdílet
Vložit
  • čas přidán 8. 05. 2023
  • 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 :)

Komentáře • 20

  • @waqarabas_72
    @waqarabas_72 Před rokem +4

    Lots of love from 🇵🇰

  • @parmeshwarkumar1324
    @parmeshwarkumar1324 Před 22 dny

    very nice video

  • @cg.yamangaming4632
    @cg.yamangaming4632 Před měsícem

    Are you very good explain

  • @EmpatheticPriya
    @EmpatheticPriya Před 4 měsíci +1

    @Yoshita Jain Thanks for making it so simple.You making every topic so easy in js.

  • @priyabratamondal257
    @priyabratamondal257 Před 5 měsíci +2

    great explanation

  • @yashverma1896
    @yashverma1896 Před rokem +1

    Great

  • @tshri4745
    @tshri4745 Před rokem +1

    Keep growing. Very informative ❤️🔥

  • @abhishekdehariya6128
    @abhishekdehariya6128 Před 4 měsíci +1

    👍👍👍

  • @manishabanjara3360
    @manishabanjara3360 Před 10 měsíci +1

    Great ❤

  • @sidharthdhiman4522
    @sidharthdhiman4522 Před rokem +2

    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

  • @yashmoriya6891
    @yashmoriya6891 Před 11 měsíci +1

    Great mam

  • @RajuDhami1
    @RajuDhami1 Před rokem +1

    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".

  • @tejalbhavsar4610
    @tejalbhavsar4610 Před 5 měsíci +1

    let and const are also hoisted but in temporal dead zone.

  • @neerajmali-dx5dq
    @neerajmali-dx5dq Před rokem

    Mam make a video on lexical environment and shadowing

  • @kiranbijarane5395
    @kiranbijarane5395 Před rokem +2

    You explain very well mam

  • @basitali2962
    @basitali2962 Před rokem

    Sister ek admin dashboard pe video banai or payment integration pe jisme braintree or stripe dono methods ka use ho raha ho plz

  • @pulkitshukla9944
    @pulkitshukla9944 Před 10 měsíci

    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

  • @codebengali925
    @codebengali925 Před rokem +1

    very nice video