Promise in JavaScript Hindi | complete tutorial | promise all | chaining | race

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024
  • in this javascript Hindi video tutorial, we learn how to use promise and how to done with promise and learn completely.
    points of video
    What is promise
    Why we need it
    Example of simple Promise
    what is finally keyword
    Exception handling with promise
    Promise Channing
    Error handling with promises
    Promise.all
    promise.allsettled
    promise.race
    • Promise in JavaScript ...
    Checkout all course an playlist
    / phpstepbystep
    Info tech video by bhasker verma
    • Tech talks with Bhaske...

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

  • @codestepbystep
    @codestepbystep  4 года назад

    ECMAScript tutorial with interview Question playlist link
    ruclips.net/p/PL8p2I9GklV46wKSUuvqBsBtU1gv9gSKKG

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

      Promise.race(iterable)
      Wait until any of the promises is fulfilled or rejected.
      If the returned promise resolves, it is resolved with the value of the first promise in the iterable that resolved.
      If it rejects, it is rejected with the reason from the first promise that was rejected.
      in order to get the 1 st settled promise we need to apply " Promise.any(iterable)"
      anyway great video.please keep it up.

  • @jagdishjena9058
    @jagdishjena9058 2 года назад +5

    sir ap bhagvan ho sir ap, etne time se Promise samajne ke liye time lag raha tha par, ess videos ko dekhne ke baad sab samaj aa gaya promise ke bare me, Thank you so much sir. This was asked me in some interviews i was unable to tell them, but now onwards i will give them the answer of Promise.

  • @DHIRENDRASINGH761
    @DHIRENDRASINGH761 4 года назад +8

    What a explanation.......... you cleared all my doubts about Promises ... Thank you.

  • @khursheedalam5786
    @khursheedalam5786 3 года назад +5

    Thanks @Anil, I have watched several videos but this video has cleared all about Promise. You have nicely covered all topics about Promise.

  • @sazi2aal
    @sazi2aal 4 года назад +4

    Don't know why such a well explain videos are not getting views and likes. Seriously bro. all my doubts are cleared. Thanks

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

      welcome bro

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

      seriously , I also think same.....I always like the way you explain sir great...keep it maintain always...lots of love from us

  • @GauravGupta-ch3lj
    @GauravGupta-ch3lj Год назад +1

    Thanks Anil ji, I always clarify my javascript doubt by going thru your videos. Your way of teaching in simplified manner is amazing.

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

    Thanks sir today you clear my concept first time. i saw many videos but your simple method and informative video is best for me.

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

    very good explanation sir ab smjh aaya mujhe promise🙏🙏

  • @alkesh.jethava
    @alkesh.jethava 4 года назад +3

    Awesome video sir,
    Keep it up, bahot hi achhe se samaj main aa raha he sir, superb 🙂😍

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

    best way of teaching.
    less time and more knowledge

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

    Unbelieve able explanation sir ur great bhat asani se samjaya very nice .

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

    I am following ur Videos motive as MEAN stack i know Angular still i will watch ur series at this time am on Express. I am 32 years old left IT now motivated.
    God bless

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

    I watched many videos of this topic but only this was very helpful for me. You cleared my all doubts.

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

    Thank you Anil sir ,this video is very helpful for me

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

    Thank you so much , best explanation , understood every concept about promise clearly🙏

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

    Great sir bahut vdeo dekha ye vdeo clear kr diya doubt

  • @JavedKhan-hp5su
    @JavedKhan-hp5su 3 года назад

    Fantastic. I watched a lot of videos about Promise but was still confused till I found this video.

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

    i have only watched only your one video but still i am liking your all videos ❤❤ thanks brother
    nice explaining❤🎉🎉

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

    love the way your teaching beacuse today i m crystal clear about promise and all method and this video is very helpful for me #thanks bhaiya

  • @ShaileshSingh-hb6gh
    @ShaileshSingh-hb6gh 2 года назад +2

    It's really helpful . I loved the way you present entire concept . Great job man

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

    Wonderful I can't explain your understanding way I like it sir.thanx

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

    best way of teaching

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

    bhuot accha kaam krre ho bhai good luck

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

    Thanks sir for explaining in such easy manner from scratch

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

    Very nice and detailed video

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

    Great video with very easy explaination. Keep making informative videos like this.👍

  • @mahendrachoudhary128
    @mahendrachoudhary128 3 года назад +3

    It would be great if you make video on async await.

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

    Great tutorial......................Best Explaination 100/100

  • @EngWorld-nr2ww
    @EngWorld-nr2ww 3 года назад +1

    Nice Explanation..Thanks for the video

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

    mujhe bada confusion tha isme.............. but thanks for solving all my doubts so easily

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

    1 like from my side to make 1k like 😊
    and this tutorial was very helpful to me

  • @AkashDeep-ux1ig
    @AkashDeep-ux1ig Год назад

    Gr8 vdo
    Thnx a lot sir

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

    A mistake is here, JavaScript code is not synchronous but it is Asynchronous.
    2:10

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

      Javascript is the synchronous single-threaded language but with the help of event-loop and promises, JavaScript is used to do asynchronous programming.

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

    Promise.race(iterable)
    Wait until any of the promises is fulfilled or rejected.
    If the returned promise resolves, it is resolved with the value of the first promise in the iterable that resolved.
    If it rejects, it is rejected with the reason from the first promise that was rejected.
    in order to get the 1 st settled promise we need to apply " Promise.any(iterable)"
    anyway great video.please keep it up.

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

    amazing explanation

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

    thank you so much sir

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

    Lovely explanation bro, you killed it. I have seen many videos on promise but no one has explained it step by step like you. Would you mind having a quick person chat?

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

    Such a great explanation 👏

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

    Thanks brother for the great explanation!

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

    superb sir

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

    Bhaiya pata kaise chalega ki function me resolve call karna h ya reject

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

    thank you so much bhaiya
    but bhaiya aap jab code likhte ho tab zoom kr liya kro code chota dikhta he , or mobile me dekhne me dikkat aati he .

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

    Nice explanation, thanks.

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

    Great

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

    Very well explained!! taken simple examples and modified the differences between them, its ok for the beginners, what if we use in advanced versions?
    could be better if you go more deep into it!! Anyways thankyou Soooo Muchh!!!!!!!!!!!!!!

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

    very nice

  • @PawanKumar-zt5sr
    @PawanKumar-zt5sr 2 года назад

    Superb explanation Anil....

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

    Good explanation.

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

    Thanks buddy for this

  • @priyankahazra8067
    @priyankahazra8067 6 месяцев назад

    Recursion mai promise object return ho sakta hai ?

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

    Api chaining sirf fetch() me hoti ya other libraries too ex- axios

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

    Hello @Code Step By Step Sir
    What will be the soln of example which you took in starting before explaining promises
    Eg let data = 2
    Console.log (data)
    data =2
    Settimeout(() => console.log(data),2000)
    data =3
    console.log('Timer':data);
    Output Came as 1,timer:3,3
    How can we get as 1,timer:3,2

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

    Nice tutorial 🔥

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

    sir event loop par video banea na plz, bahut baar pucha jata hein interview mein.

  • @ahadshah6590
    @ahadshah6590 11 месяцев назад

    Hello Sir
    What will be the solution of example which you teach in starting before explaining promises
    Eg let data = 2
    Console.log (data)
    data =2
    Settimeout(() => console.log(data),2000)
    data =3
    console.log(`out put is ${data}`);
    they give this
    timer:3,3
    but i want this out put
    timer:3,2
    please explain this

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

    cant we mention resolve and reject both together, code run hone ke baad pata chalega na ki error hai ki ni code me? then agar dono use kare and if anyofthem is true then execute that

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

    Thankyou sir ji

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

    No Words: 😍❤❤

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

    Nice one

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

    quite amazing

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

    nice explanation

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

    u r amazing Anil sir:)

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

    sir Axios pr ek video bna do full api k sath React me

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

    Wonderful

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

    Sir to ham kah sakte he promise process ko asychnous bnata he right?

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

    I am fetching the same url but its getting an error of cors policy: Response to preflight request doesn't pass access control check: Redirect not allowed for a preflight request.

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

    Thanks for this !! You made it look so easy! At 23:28 console doesn't print error from catch block instead it is just throwing the error, so it really didn't enter catch block i guess?

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

      yes, I was also thinking that

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

      Warn me krrhe hai that's why 😀

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

    do you have any beginner
    to advance java script course here on youtube or udemy

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

    mujhy async aur await bhi use krna hey promise ke saath me

  • @anilgupta-dy1oj
    @anilgupta-dy1oj 10 месяцев назад

    Anil sir
    why we always written setTimeout in side promise ? what is actual need? please clear

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

      to add some time gap in code execution

  • @AllInOne-vz3cm
    @AllInOne-vz3cm 5 месяцев назад

    sir,
    Javascript is syn or Asyn language ??
    I am comfused , since somewhere it showing syn and some where its howing asyn , please help

  • @DeepakGupta-hj2dv
    @DeepakGupta-hj2dv 3 года назад

    Asyn await ka video bnao

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

    const p1 = () => {
    return new Promise((resolve, reject) => {
    resolve('first')
    })
    }
    const p2 = () => {
    return new Promise((resolve, reject) => {
    resolve('second')
    })
    }
    Promise.all([p1, p2]).then((result) => {
    return result.map((item) => item)
    }).then((result) => {
    return result.map((item) => item)
    }).then((l) => {
    console.log(l)
    })
    it is not resolving but every time it return array of promise
    i can solve this by const p = new Promise((resolve, reject)=>{resolve('second')}) but i apply my approach its not working
    help me on this sir

  • @Rahul-tf6vx
    @Rahul-tf6vx 11 месяцев назад

    firstly you explained what problem we face when some line in our code take time, then you told promise solve this problem, but you didn't tell how it is solving, because still javascript doesn't wait and it executes the next lines.
    so confusing

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

    var a = 1;
    console.log(a);
    a = 2;
    var data= new Promise((resolve,reject)=>{
    setTimeout(()=>{
    resolve(a);
    },2000);
    }).then(r => {
    console.log(r);
    });
    a = 3;
    console.log('last',a);
    THIS CODE STILL GIVES THE SAME WRONG OUTPUT AS :
    1
    LAST 3
    3
    NOW WHATS THE POINT OF USING PROMISE?

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

    sir volume to check krte aawaj hi bhut kam aa rhi h

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

    sir start NodeJs project

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

    sir... why you are using console.worn🙄

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

    Java Script execute ascync manner.

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

    U mean asynchronous not synchronous

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

    javascript is asynchronous not synchronous sir please correct this i video

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

      you are wrong bro javascript always synchronous if you dont believe search on google

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

    Dummy API nahi ..

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

    thank you so much sir