L&T Node js Interview Question Answer @2021 | Mean stack interview questions

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

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

  • @harshaambadkar2969
    @harshaambadkar2969 Год назад +5

    42:35 This is because the var keyword does not have block scope, so the variable i is still accessible outside of the for loop. By the time the setTimeout functions run, the for loop has already finished and the value of i is equal to 10. The value of a[10] is undefined, so that is what will be logged to the console.

  • @kishanmaurya4865
    @kishanmaurya4865 Год назад +3

    This is because the setTimeout function is an asynchronous function that will not block the execution of the rest of the code. Therefore, when the console.log statement inside the function is executed after the delay of 1 second, the value of i will have already reached 10, which is outside the index range of the array a. As a result, a[i] will evaluate to undefined for all iterations.

  • @TheKumarAshwin
    @TheKumarAshwin 2 года назад +2

    42:37 loop only exits until the set condition breaks.
    And the function is called after 1000ms so the variable is already incremented to 10.

  • @HamidAli-ck3db
    @HamidAli-ck3db 2 года назад +1

    The var provide the global and the let provide the local scope in the javascript part. that is why is provide the undefined for the let and value for the var keywords.

  • @soniramgaur564
    @soniramgaur564 2 года назад +1

    Well explained
    I found no where like it amazing

  • @binodkumar-em7ub
    @binodkumar-em7ub 10 месяцев назад

    The provided code will output undefined ten times. This happens because the setTimeout function is asynchronous, and by the time the callback is executed, the value of i has reached 10, which is outside the valid index range for the array a.

  • @PoojaSingh-fe1ry
    @PoojaSingh-fe1ry 2 года назад +1

    Undefined, because const is block scope, it's not working in another block, because for loop also creating block.

  • @suvadeepdutta3461
    @suvadeepdutta3461 Год назад

    Thanks for the help

  • @poojalahane2584
    @poojalahane2584 4 месяца назад

    thank you

  • @CK-ir2ke
    @CK-ir2ke 2 года назад +1

    Really very useful sir, please make react js interview questions as well very helpful sir. Thank you

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

    did they asked you about the projects u have completed before and to show on their desktop

  • @chandradeepkumar4905
    @chandradeepkumar4905 3 года назад +1

    Nice question🙋

  • @Anuradha-nk9bf
    @Anuradha-nk9bf 3 года назад +1

    Thanks

  • @shivanibutola8788
    @shivanibutola8788 Год назад

    Kaun si company hai ye

  • @crystalclear178
    @crystalclear178 2 года назад +1

    I'm searching for MERN stack interview questions... i want to apply for Full stack..but backend interview ke bare me abhitak thik se koi prepration nahi hai... please suggest me

    • @faruinterviewquestions1069
      @faruinterviewquestions1069  2 года назад +1

      don't worry First give interview, diffidently you will qualify , minor diff b/w MERN and Fullstack.

  • @pankajmaddheshiya587
    @pankajmaddheshiya587 3 года назад

    Thank you so much for sharing question 👍

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

    In youtube I don't find much MEAN stack projects ... So can you recommend me some place where i can find projects on MEAN stack

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

    The output is undefined because of closure concept in Java script..

  • @eneshpal8782
    @eneshpal8782 3 года назад +1

    Sir these questions for, how much experience

  • @gagankumar1325
    @gagankumar1325 3 года назад +1

    Sir, please make more videos 👍

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

    Bro aapka experience kitna tha interview ke time?

  • @jugalkchoudhary8686
    @jugalkchoudhary8686 Год назад

    Completely murkh or logo ko murkh bna ra...