Frontend Interview Question | setTimeout | Promises | Asyn Await | Javascript Interview

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

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

  • @dhawlandrashrivastav
    @dhawlandrashrivastav 10 месяцев назад +1

    You must have millions subscribers. One of the best channel I found on youtube where you have lots of examples with correct definition

  • @HollyJolly83
    @HollyJolly83 2 года назад +4

    I referenced so many videos to find the exact difference between asyn await and promises but you explained the practical approach in a much simpler way to understand. Thank you.

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

      Glad to know it helped 😀😀

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

    Most underrated channel Ma'am .Thank you

  • @ShravanKumar-kh2un
    @ShravanKumar-kh2un 2 года назад +3

    Thanks Nisha Singla, same method using ES6 arrow functions
    const delayOne =(x) => {
    return new Promise((resolve) => {
    setTimeout(() => {
    resolve(x);
    }, 2000)
    })
    }
    const test =async() => {
    console.log("started")
    for(i=0;i

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

    Simple and Great explanation

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

    Amazing explaination

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

    Loved this video

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

    All videos are really informative and helpful 👍👌

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

    This video cleared my all confusion related to promises. Great 👍 Thanks Mam

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

    Beautiful explanation. Very easy to understand with your examples.

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

    Thanks for the video 😊

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

    Best video ever 👍

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

    Very simple explanation Nisha...

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

    Nicely explained 👍

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

    Thanks for the video.., superrr helpful👍👍👍

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

    Really helpful 👍

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

    Liked the way of explanation

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

    Thanku very much

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

    super explanation.

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

    Thank you mam!

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

    heya nisha i just finished ur angular playlist and it helped me understand some concepts, will you ever do a NGRX playlist thanks!

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

    Very simplified explanation loved it 👍, please do make this interview questions type of video more 😅

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

    Hi Nisha, content is good and way of explanation is very nice.

  • @dharmeshgohil9375
    @dharmeshgohil9375 8 месяцев назад

    just loved your explanation can you share all code so we can use it as note before intrerview

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

    4:11 why its displaying 11 still I am not able to get . anyone ?

    • @pvinayak96
      @pvinayak96 11 месяцев назад +1

      setTimeout function gets called and queued for every iteration of the for loop. But it doesn't execute the callback function written inside. It gets executed only after 1000 milliseconds as specified as an argument. By that time, the for loop has been executed for 10 number of iterations and the value of var i is now 11. It's evident that for loop has executed that quick, the reason why we see "Ended" printed in the console.

  • @RaviGupta-rn8rr
    @RaviGupta-rn8rr 2 года назад

    There is no Closure at the time 5:23

  • @________.pathfinder
    @________.pathfinder 6 месяцев назад

    I did same with foreach loop in different case, it was not working, so i came to this video and checked here you have used forloop and tried same then it's working... What's the problem with forEach?

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

    Can you please make a video on complete MERN stack developer (full stack developer) interview rounds and questions....I'm fresher and on you tube thr are only frontend or backend..but no one is guiding for full stack

  • @Astra-fo3yz
    @Astra-fo3yz 2 года назад

    p͎r͎o͎m͎o͎s͎m͎ 😓

  • @coder-webdev5907
    @coder-webdev5907 2 года назад

    Somebody help me in this problem
    Please write solution in javascript
    Write a function called do_allocation(number_of_people, number_of_buses)
    The function should return a list of number of people who can get into the next bus that comes in based on the following logic:
    Each bus’s capacity is the sum of the capacities of the previous two buses.
    Once all the people get in, then the buses can continue, but will have 0 people inside it.
    This is the case when the number of people are less and there are more buses. So after all the people are already boarded, then the remaining buses will have 0 people boarding.
    The output of the function is an array/list with the same length as number_of_buses.
    The total of this output array/list should be less than or equal to the number_of_people.
    The first bus’ capacity can be set to 1 by default.
    E.g.
    Def do_allocation(number_of_people, number_of_buses):
    …. Your code….
    Return array[number of people got into first bus, number of people got into second bus, …. , number of people who got into last bus]