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

Поділитися
Вставка
  • Опубліковано 11 лис 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.

  • @binodkumar-em7ub
    @binodkumar-em7ub 9 місяців тому

    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.

  • @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.

  • @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.

  • @poojalahane2584
    @poojalahane2584 3 місяці тому

    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

  • @suvadeepdutta3461
    @suvadeepdutta3461 Рік тому

    Thanks for the help

  • @soniramgaur564
    @soniramgaur564 2 роки тому +1

    Well explained
    I found no where like it amazing

  • @chandradeepkumar4905
    @chandradeepkumar4905 2 роки тому +1

    Nice question🙋

  • @vaibhavsutar7163
    @vaibhavsutar7163 2 роки тому

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

  • @pankajmaddheshiya587
    @pankajmaddheshiya587 2 роки тому

    Thank you so much for sharing question 👍

  • @sameerkhan6197
    @sameerkhan6197 2 роки тому

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

  • @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.

  • @gagankumar1325
    @gagankumar1325 2 роки тому +1

    Sir, please make more videos 👍

  • @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

  • @Anuradha-nk9bf
    @Anuradha-nk9bf 2 роки тому +1

    Thanks

  • @shivanibutola8788
    @shivanibutola8788 Рік тому

    Kaun si company hai ye

  • @eneshpal8782
    @eneshpal8782 2 роки тому +1

    Sir these questions for, how much experience

  • @shreyash8273
    @shreyash8273 2 роки тому

    Bro aapka experience kitna tha interview ke time?

  • @jugalkchoudhary8686
    @jugalkchoudhary8686 Рік тому

    Completely murkh or logo ko murkh bna ra...