JavaScript Callbacks & Promises | Sigma Web Development Course - Tutorial #75

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

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

  • @Akshat_Sinha_
    @Akshat_Sinha_ 6 месяцев назад +91

    To people who can't understand it:
    Don't panic. Use multiple resources, listen to all of them define promises and callbacks. Then get a notebook and write your general understanding of whatever you have learnt. Write the code in videos by yourself and if you can't understand any part of it use chat GPT. You will understand it in 2-3 days (not fully but have a grasp)

  • @Hafijur0211
    @Hafijur0211 11 месяцев назад +17

    🎯 Key Takeaways for quick navigation:
    00:00 📚 *Introduction to Callback Functions and Promises*
    - Callback functions are functions passed into another function as an argument, invoked inside the outer function to complete an action.
    - Asynchronous nature of JavaScript explained with examples of setTimeout and console.log order of execution.
    - Callback functions allow for asynchronous programming but can lead to callback hell or pyramid of doom.
    04:06 🔄 *Managing Callback Hell with Promises*
    - Promises provide a solution to callback hell, offering a cleaner and more manageable way to handle asynchronous code.
    - Promises represent a guarantee of code execution, useful for waiting on tasks without blocking other operations.
    - Creating and utilizing promises allows for more organized and structured code, improving readability and maintainability.
    17:21 🔒 *Promises and Resolve/Reject Mechanism*
    - Understanding the concept of promises and their role in code execution.
    - Explanation of the resolve and reject functions within a promise.
    - Demonstrating how to use `resolve` to indicate successful completion of a task and `reject` to handle errors.
    19:34 🛠️ *Handling Promise Results and Errors*
    - Using `.then` to access the resolved value of a promise and perform further actions.
    - Implementing `.catch` to handle errors that occur during promise execution.
    - Emphasizing the importance of error handling in asynchronous code execution.
    24:15 🔄 *Promise Chaining and Promise.finally*
    - Understanding promise chaining to pass resolved values between promises.
    - Introduction to `promise.finally` for performing cleanup actions after promise execution.
    - Explaining the concept of passing resolved values through a chain of `.then` handlers.
    26:06 🤝 *Promise.all and Promise.race*
    - Utilizing `Promise.all` to wait for multiple promises to resolve and gather their results.
    - Introduction to `Promise.race` for determining the fastest resolving promise among multiple promises.
    - Illustrating scenarios where `Promise.all` and `Promise.race` are beneficial, such as handling multiple network requests or downloads.
    28:54 ⚖️ *Understanding Promise.all settled and Promise.resolve/Promise.reject*
    - Explaining `Promise.all settled` to handle both resolved and rejected promises.
    - Introducing `Promise.resolve` and `Promise.reject` to create promises with predefined states.
    - Demonstrating how to handle promises with different states and reasons using these methods.
    Made with HARPA AI

    • @emadraza3698
      @emadraza3698 9 месяцев назад

      wonderful summation of all the explained topics

  • @harishbhise7979
    @harishbhise7979 Год назад +57

    What a coincidence
    We just had a lecture on promises in morning and no one understood that.
    But now can.
    Thanks sir

  • @hiphop861
    @hiphop861 Год назад +73

    75 day challenge complete 😮😮❤❤
    Perfectly explained Harry Bhai
    #SigmaBatchOP

  • @DakiChikiAau
    @DakiChikiAau Год назад +38

    Took a months break and starting again today, felt like I need to revise previous topics to understand all the new concepts.
    Also writing this comment to make a note to self that I must catch up again.
    So, if you are watching this series in the future. I have a few things that'll help you stay consistent :-
    - Revise, all the topics. It'll take a few minutes if you do it daily, but is a really important thing to do.
    - It's alright if you have fallen behind, catching up again is important and should be priority.
    So yea, keep watching and learning. You'll complete the series and gain good amount of knowledge about web dev.
    #SigmaBatchOP

    • @ice-777-r1k
      @ice-777-r1k 8 месяцев назад

      bro i want to know how u practise js its very difficult for me to practise i learn the concepts but at the time of implemnetation i just can't idk how i wanna really practise js and want to make projects and more

    • @RoronoaZoro78687
      @RoronoaZoro78687 6 месяцев назад +1

      Bro how will i get a job by this pzz tell me iam doing my best

    • @ice-777-r1k
      @ice-777-r1k 5 месяцев назад

      @@RoronoaZoro78687 just by doing Javascript then NO but doing a frontend framework and backend, database and have a sharp skills u can get a job , but makes projects, learn through projects

    • @thelunatiK
      @thelunatiK 5 месяцев назад +1

      @@RoronoaZoro78687 Teri lagey toh muje bhi bta dena

    • @RoronoaZoro78687
      @RoronoaZoro78687 5 месяцев назад +2

      @@thelunatiK sorry bhai me (how) likhna bhul gya tha 🙂

  • @Yasinkhan-tm8jv
    @Yasinkhan-tm8jv Год назад +20

    from DOCTYPE to today I have written and implemented the code in VS code. with our writing, it's not easy to understandout
    Thank sir
    the course is outstanding

  • @humanish_ai
    @humanish_ai Год назад +34

    00:01 Callbacks are functions used to call a function and can be passed as arguments.
    02:14 JavaScript uses asynchronous functions to postpone execution.
    06:00 Installing ES7 React Redux Extension
    08:06 Using callback to load script and control function execution
    11:50 JavaScript Promise is the solution to callback hell
    13:50 Using Promises in JavaScript instead of waiting for callbacks
    17:29 Understanding JavaScript Promises and their handling
    19:19 Explaining JavaScript promises and handling resolve and reject scenarios
    22:47 Handling network request responses with JavaScript Callbacks & Promises
    24:19 Promise chaining allows passing resolved values through multiple handlers.
    27:47 Understanding the difference between resolved and settled promises
    29:23 Using promise.race to show the image of the promise resolved first among the five.
    Crafted by Merlin AI.

    • @ShashankMishra-rl1vy
      @ShashankMishra-rl1vy Год назад

      Thank you guy fo this timestamp, May Harry not needed to do so because of you people's presence.

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

      @@ShashankMishra-rl1vy there is merlin AI to do these type of tasks

  • @lakshyarajdash
    @lakshyarajdash Год назад +15

    This is the most important part and problematic part for me since I've started using pure js for my projects. The video works like "cherries on a cake". Thanks Harry bhai for furnishing us with great concepts.❤

  • @ombhandwaldar8304
    @ombhandwaldar8304 Год назад +4

    This is a great series. Every concept is being cleared in a simplified manner.👍👍

  • @chahatkumar9301
    @chahatkumar9301 Год назад +24

    first 13mins mere to out of head gyi h. fir se dekhni pdegi

    • @harshitsanwal2954
      @harshitsanwal2954 10 месяцев назад +4

      same broo

    • @emadraza3698
      @emadraza3698 9 месяцев назад +1

      mjhe samjh ayee reason ye hai ke code ko saath likho aur notes khole rakho thora focus karo ayega samjh bilkul

  • @shayanaqudas1
    @shayanaqudas1 Год назад +4

    One of the finest channel on per ❤❤

  • @zainabkazi4102
    @zainabkazi4102 5 месяцев назад +1

    i wasnt ableto understand the concept of promises at all when i watched it once. fir maine 3br video dekha 2br notes read kiye tb jake clear hogya thankuh harry bhai

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

    Although he taught us basics after that I am studied from paid course but Harry sir is love ❤️
    Because he makes our basics osm ❤️
    Love you sir always ❤️💯

  • @sagarbiswas5689
    @sagarbiswas5689 11 месяцев назад +3

    This is literally the best course!!!!
    I am a little late but will soon catch up.
    Love u Harry sir❤❤

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

      Same I am also late. I am 46 videos late😭😭

  • @RealRodGaming
    @RealRodGaming 10 месяцев назад +2

    Day 8th And Learnt 60% html 50% css, Javascript is a bit confusing for me as i don't have any other programmign language knowledge but this course is the best course i have found ❤❤

  • @07_amanmalviya88
    @07_amanmalviya88 3 месяца назад +1

    BEST COURSE I EVER SEEN

  • @Anshu_0.7
    @Anshu_0.7 Месяц назад +1

    21:27 harry bhai main phone main hi dekhta hu aur sath hi sath laptop main code karta hu best way😊

  • @naturalsoul-mt6wp
    @naturalsoul-mt6wp 8 месяцев назад +7

    Harry bhai you have raised the bar like anything
    😰😨😧😥😭😱😮😯😲😳🥺🧐🥵🤒🥴🥶😵‍💫
    Expert ka badla hum beginner kyun lia harry bhai

  • @JaikumarLohana-v4t
    @JaikumarLohana-v4t 5 месяцев назад +2

    Don't panic not an easy topic to understand and will take some time so don't worry took me a full day to understand this topic need to code along create my own random promises create my own questions need to practice and 100% will understand everything keep notes alongside everything is nicely explained

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

    sir i was following ur JS series but i get suggested by it from youtube ...this series is really awesome sir

  • @sahilkhandekar9751
    @sahilkhandekar9751 10 месяцев назад +34

    if any one is facing issue in understanding callback & promise concept. checkout the Namaste JavaScript series by AKSHAY SAINI, it's a great series which covers some advance topic which are also important from the perspective of interview. Moreover it's the deep explanation of the topics.

    • @yusrax3
      @yusrax3 6 месяцев назад +2

      better to refer him after completing harry js playlist as he has used arrow function in very first vid i hope u got what i meant

  • @ayushmaanraturi
    @ayushmaanraturi 16 дней назад

    Tutorial - 75 Done ✅
    #SigmaBatchOP #HarryBhai
    Thank you ❤ Harry bhai for this amazing course

  • @adarsh.namdev
    @adarsh.namdev Год назад +5

    Phle video dekhi thoda thoda smjh aaya ,phir notes padhe ,phir video dekhi , maje aa gaye ❤🎉
    #SigmaBatchOp

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

      apny notes kesy find kiye , i dont knw if you please tell me

    • @studykaro471
      @studykaro471 10 месяцев назад

      link is given in the discription@@faizaislam6191

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

      @@faizaislam6191 link dia hn

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

      @@faizaislam6191 bhai code with harry website p jao waha mil jayenge

  • @Dileep_kushwaha02
    @Dileep_kushwaha02 Год назад +6

    #Sigmabatchop
    #JavaScript op
    Thank you so much harry sir for giving us this amazing course

  • @user-sololeveling
    @user-sololeveling 7 месяцев назад

    JavaScript is hard but harry is a good teacher to explain anything

  • @PCCOERCoder
    @PCCOERCoder Месяц назад +3

    Lecture successfully completed on 26/11/2024 🔥🔥

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

    Very easy to understand, such a great teacher 😊

  • @rafayjilani9377
    @rafayjilani9377 Месяц назад

    This course is outstanding ❤

  • @SANTOSH_Raut
    @SANTOSH_Raut Год назад +65

    I have a suggestion. Change the blue color of the thumbnail into something else whenever you enter into a new chapter. That will separate the concept and it will be easy for the future viewer to navigate through the playlist. It's just a matter of minutes to tweak this thing a little bit, and it will have a great impact if you see it in the long term.

    • @AnksioXD
      @AnksioXD Год назад +2

      like 1 key element that will vary on each video's thumbnail, even if the thumbnail format remains the same

    • @AnksioXD
      @AnksioXD Год назад +2

      only varying thing is the text which is barely visible on android phones

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

      I have a 22-inch monitor. It is challenging to see it clearly even on such a big screen man....@@AnksioXD

    • @faizuddin4032
      @faizuddin4032 Год назад +2

      Just increased font size of every topic is enough, it is getting difficult to identify the topics. 😢

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

    Thank you Harry Bhai for your sincere efforts, I promise I will do my best from my side and I've already commented my feedback on the first video of this Sigma course

  • @kyzakplays
    @kyzakplays 10 месяцев назад

    Bhai, main phle he docs and other channel is basic kar chuka hu phir thoda python me chla gya tha and ab firse web dev ka revision chalu aur manoge nhi har ek chij ati hain but syntax idhar ke udhar ho gye and ab google search markar jb code likhta hu tb feel ati hain ki ha harry bhai ne jaisa kha tha ki rattna nhi bs google kar lena.
    still to refresh concepts, I am gonna watch this whole series in 2x. 😎😎

  • @gamzerymrahul6408
    @gamzerymrahul6408 10 месяцев назад

    JS Op 75 vedio taak pahuuch gaaya wow

  • @Chromework-g9p
    @Chromework-g9p 8 месяцев назад

    best web devolpment course ever

  • @trex4815
    @trex4815 11 месяцев назад +2

    I have a doubt, @8:04, at line 21, sc.onload=callback("Harry"), he is calling the function, whereas since onload is an event, reference of a function should be assigned to events, Harry is getting printed because the execution is going to that line, not when the script loads.
    It should be something like-> sc.onload= function() {
    callback("Harry");
    }; an anonymous function that gets called when the script loads. If there wasn't any input argument, it could simply be sc.onload=callback;
    Please anyone correct me.

    • @PokeNoir1
      @PokeNoir1 9 месяцев назад

      you are right, we need to give the reference of a function that can act as a callback for the event, that only worked in harry's case probably because execution flow went to that line.

  • @Ankitkumar-gc7ul
    @Ankitkumar-gc7ul Год назад

    i am giving it 1000 stars out of 10

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

    I am glad as a subscriber of your channel

  • @Devloparth
    @Devloparth 4 месяца назад +1

    great explanation totally understood

  • @iam-kanav
    @iam-kanav Месяц назад

    11:41:41 Well... That Typhlosion favorite has certainly changed its meaning.

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

    10 Star Course ⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

  • @pradhyumansinghdheerawat581
    @pradhyumansinghdheerawat581 Месяц назад

    Thanks #HarryBhai #SigmaBatchOP aaj lag raha hai ki bahut hi high level ka content dekha is course me, shuru me harry bhai aapne sahi kaha tha we will raise the level of this course , once again thanks.

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

    Bro your courses is Best among the Best.
    JavaScript OP🤺

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

    Great Harry sir to provideing these kind of valuable contend ❤❤

  • @Iplhiligh2024
    @Iplhiligh2024 Год назад +2

    75 day challenge complete 😮😮❤❤
    #SigmaBatchOP

  • @Vincy._.jaiswal_0.7
    @Vincy._.jaiswal_0.7 11 месяцев назад +1

    Yes bhaiya i as you said i can't understand but i will read your notes and do my best to do it

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

    Your Content is Top Notch and Outstanding 😍😍

  • @SamarAhamad
    @SamarAhamad Месяц назад

    wow its amazing video for all engineers

  • @MrShafaat-pk5gn
    @MrShafaat-pk5gn 7 месяцев назад +1

    I would recommend shradha khpara lectures on Callback, Promises, callbackhell, asyn-await to better understand these concep.

  • @AbhishekSingh-wb3lr
    @AbhishekSingh-wb3lr 10 месяцев назад +1

    ⭐⭐⭐⭐⭐ best web development course

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

    teen baar callback dekhne ke baad smj aa gya finally 😁

  • @missannie1272
    @missannie1272 Год назад +2

    Sigma Batch OP

  • @pragyanshukashyap7258
    @pragyanshukashyap7258 4 месяца назад +3

    Harry bhai ab tm pehle ki tarah efforts deke nhi samjhaate , ab bss bta dete ho jisko samjh aaya thik h nhi aaya toh bhi tmhe koi fark nhi padta . Or pehle k videos mai tm medium level k concepts ko bhi different ways mai samjhaate the or ab hard hard concepts ko bhi ek baar formality mai bta k aage badh jaate ho

  • @hanzalamansoor
    @hanzalamansoor 10 дней назад

    Yaha Harry bhai nay beginners k liye bohot mushkil kardia hai , 76 videos saay sab samhaj arha tha per yaha paay I completely lost it, koi baat nhi aur bhi video hai RUclips per jis say aapko samhaj ajyega.

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

    Perfectly explained Haris vai....
    #SigmaBatchOp

  • @supremeleader5516
    @supremeleader5516 10 месяцев назад +13

    samajh nhi aya lekin sunke acha laga

  • @mdmaroof6176
    @mdmaroof6176 Год назад +4

    mera javascript me Basic clear nhi hai ye samajh nhi aa raha hai to main kya kru sirf tutorial dekhne se nhi ho raha hai logic build kaise hoga

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

      BRO projects banao dekh ke sabh clear ho jaega

  • @DeepikaDecodes
    @DeepikaDecodes Год назад +2

    Great explanation

  • @rmworld420
    @rmworld420 9 месяцев назад +235

    Kitne Log Mobile Me dekhte hue laptop me coding karte hai 😂

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

    Bhai ap apne DSA in c language bali series ko continue kariye 😢 usme abhi bahut topics left h 🥺🥺

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

    snippets 14:09
    promises 17:11

  • @niloykumarmohonta
    @niloykumarmohonta 5 дней назад

    thanks, concept clear now

  • @farplayzwastaken
    @farplayzwastaken 6 месяцев назад +1

    21:33 That was personal 😂. It hit me hard.

  • @isheep9025
    @isheep9025 9 месяцев назад +3

    The Promise.resolve/reject methods
    Promise.resolve(value) - It resolves a promise with the value passed to it. It is the same as the following:
    let promise = new Promise(resolve => resolve(value));
    Promise.reject(error) - It rejects a promise with the error passed to it. It is the same as the following:
    let promise = new Promise((resolve, reject) => reject(error));

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

    From the day I start learning coding my simp method...watch in mobile code in laptop 😊

  • @DipakDas-mf3jf
    @DipakDas-mf3jf 9 месяцев назад

    Sigma Batch Op harry bhai 🔥🔥🔥🔥🔥🔥

  • @GauravGupta-o6f
    @GauravGupta-o6f 4 месяца назад

    harry bhai I LOVE YOU 😁😁 nice course thank you

  • @paawangarg2582
    @paawangarg2582 8 месяцев назад +5

    Yaar Harry bhai apki JS Samaj Nahi Arahi!!! bhaut Skip Ker Ker KE batare ho LECTURE 73 SE SAMAJ NHI ARA LOGIC BATAYA HE NHI DHANG SE!!!!

  • @GuglePhutus-m3c
    @GuglePhutus-m3c 11 месяцев назад

    Very nice explanation i love it

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

    गोइंग very s
    Fast and serious ❤❤❤

  • @Engineering_Unlocked
    @Engineering_Unlocked 2 месяца назад +1

    thank you so much bhaiya :)
    completed on 1/11/24

  • @vicky_6565
    @vicky_6565 10 месяцев назад

    Love you Harrry bhai.............................❣❣❣❣❣❣❣

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

    Baap course haiii #SigmabatchOP

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

    Ocean of knowledge.

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

    big shout out to harry bhai to complete 75th video OF SWDC

  • @solankiviral9600
    @solankiviral9600 6 месяцев назад +1

    if any one can daunt at this point you can check our harry old web development playlist where harry can brief explain all concept that are mention in their notes 👍

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

    24:28 i have a feeling that it is similar to exception handling...isn't it?

  • @GODBROTHER-yu5jf
    @GODBROTHER-yu5jf 13 дней назад

    I know you found it difficult to understand. I have understood callback and promises before from other vids now going through this. The thing is harry is trying to merge a lot of things to make you understand and revise a lot at once in every video. If you are not getting it i have made a perfect readme file to understand promise and callback. With perfect examples and in own words, trust me its worth, if you want i can give you just reply to this comment

  • @Rieshu-l9i
    @Rieshu-l9i 11 месяцев назад

    #SigmaBatchOp & CodeWithHarry Rocks

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

    Great Harry love from Pakistan .

  • @code_x_harsh
    @code_x_harsh 3 месяца назад +2

    JavaScript OP...🔥🔥🔥🔥

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

    Thank you very mcuh bhai for making this course for us

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

    congratulations 🎉👏 Harry sir we can complete 75 hard

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

    tough tha but projects me is chez ko asa clear krwna k sb smaj ajay :)

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

    15 December 2023, 2:22 Pm , after coming from giving my Linux Exam, yes I'm doing this beautiful Course

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

    21:04 no sir, I clearly understand everything showing on this video

  • @Unstoppable.Sakshi
    @Unstoppable.Sakshi Год назад

    JavaScript OP! Harry Bhai

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

    I watched this twice, and all I have is Cleared Concepts

    • @nbreviews1
      @nbreviews1 3 месяца назад

      bhai mujhe smjhaa dee

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

    those who don't get it, watch this 2 3 times and search online and just understand the concept that's it if interviewer ask you about this you can explain them

  • @gouravjassal4191
    @gouravjassal4191 5 месяцев назад

    17:15 promise topic start

  • @dineshsharma55-op
    @dineshsharma55-op Год назад

    love yo harry bhai

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

    It is very hard to understand even i watch it from multiple sources for many times but i think practice will made it understandable for me

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

    I Really do appriciate Your Content Bro but Come to the straight point while explain while watching this I loose focus after sometime

  • @muhammadmahad-sr4sx
    @muhammadmahad-sr4sx Год назад

    Lovely course cant wait to know morw

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

    its absolutely amazing thank you sir 😍😍
    #javascriptop

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

    Sir please make a video on backend development roadmap with all required learning material 🙏😘

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

    It's very useful tutorial than u sir

  • @suvojitpal6967
    @suvojitpal6967 9 месяцев назад +1

    So no one noticed the subtitle at 12:02

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

    @codewithharry why dont we use try catch instead of promise

  • @Quranicinspirations-o2n
    @Quranicinspirations-o2n Год назад +1

    #doubt Sir kya ap iss playlist mai backend b sikhayn gy like node js and javascript or python django

  • @215_PronayGhosh
    @215_PronayGhosh 5 месяцев назад +1

    Nice t-shirt bro..... I need your T-shirt🤗🤗

  • @markiV643
    @markiV643 5 месяцев назад

    btaao harry bhai ko font size bada karne ko bol re, or khud phone main coding kr re hain.