Var/Let/Const in hindi | Javascript Interview Questions and Answers

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 15

  • @Aditya-gh4jy
    @Aditya-gh4jy Год назад

    recently i was giving an interview where i was asked about wether let is hoisted or not, I told that let is hoisted but in different manner (since it knows about the existence of the variable ) but he told me that let is not hoisted. What to do in such situations ?

    • @SofiaGoyal
      @SofiaGoyal  Год назад +1

      You could have done the following:
      1. Show in the browser. You can just run a small program where in the js file you can just write :
      console.log(a);
      let a = 10;
      and then when you run it in debug mode you can show the js scope and script in browser where we can see that a is set to undefined.
      2. If not this then even you can show the error in console which is -
      *Uncaught ReferenceError: Cannot access 'a' before initialization*
      Obviously the error is not that 'a is not defined' , so if it is not hoisted then it would have thrown not defined.
      3. You could have explained about the temporal dead zone.
      Last but not the least, don't be demotivated with this. Even if you would have done all of this and proved your point then even the interviewer could have been offended. Also, many people just take interviews on the basis of their experience not on the basis of their knowledge. So, some times it's just hard luck to get such interviewers.
      You are going in the right direction and I am sure, you will get a good job at a good place. All the best 👍

    • @Aditya-gh4jy
      @Aditya-gh4jy Год назад

      I will try one of these methods if asked in my next interview.
      and thanks for the reply and for taking your valuable time to write the detailed explanation. 👍

  • @Ajayyadav-wo7ln
    @Ajayyadav-wo7ln 7 месяцев назад

    All is simple way understood....thanks a lot......

    • @SofiaGoyal
      @SofiaGoyal  7 месяцев назад

      Glad you liked it 😊

  • @TKGLogs
    @TKGLogs 2 года назад

    Thanks for this types of videos maam it helps a lot

  • @Monotonic_Stack
    @Monotonic_Stack 2 месяца назад

    really awsome video

  • @sanaahmad6695
    @sanaahmad6695 2 года назад

    Ma'am you should define what is hosting how it can be done then the concept of hosting in var let const

  • @kewalkandpal
    @kewalkandpal 2 года назад

    hello mam 🙏
    I have a question please guide me
    i am a non technical background student i have done my graduation in BA from delhi university
    and recently i have done my deploma in web designing from an institute
    my skills are JavaScript,react,redux, html,css, bootstrap
    can i apply for a front-end developer roll
    please guide me 🙏

  • @rehanhaque9077
    @rehanhaque9077 2 года назад

    Next videos please

  • @rehanhaq3564
    @rehanhaq3564 2 года назад

    please upload the next topics

    • @SofiaGoyal
      @SofiaGoyal  2 года назад

      Trying to upload soon... 👍

  • @srinivasmerugu7509
    @srinivasmerugu7509 2 года назад

    Hi Madam could you please explain in English it's my request

    • @SofiaGoyal
      @SofiaGoyal  2 года назад

      The future videos will be in English... I have just published one you can check that out..
      Also for this video please check the points I have written in the word document in this video only.. That will be helpful