JavaScript Callbacks, Promises, and Async / Await Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024

ความคิดเห็น • 86

  • @baranvabaharan
    @baranvabaharan 3 ปีที่แล้ว +14

    Hello teacher. Hope you are doing well 😊
    I am taking the JavaScript fullstack course and going through complex app.
    When waching the videos i pause it and do everything with you and also put comments of your explanations.
    Can you guide me get the most out of my learning?
    I don't know what to do after completing complex app. Do it again by myself?
    And also how to stay motivated?
    Thanks for taking the time to read🌷

    • @LearnWebCode
      @LearnWebCode  3 ปีที่แล้ว +16

      I think a good next step after that course is to practice a front-end library like React or Vue. Another good step is to create a slightly different app than the simple social network app in the full-stack course. It can be similar, but make sure it has at least one different feature that you'll have to invent the application logic for. I think motivation is something that everyone always struggles with. Personally, coffee and music help, and also doing lots of my own little experiments (instead of huge entire applications) just to make sure I understand one isolated piece of technology before moving onto something else. Also a big motivation helper is to step back and get some perspective; what I mean is, I think as soon as we learn something new we make the mistake of thinking it's not special or useful or difficult any longer. Sometimes taking a moment to reflect on how much you've learned in the last year or two; contrasting what you knew back then with what you know now, can be a super positive exercise and motivate you to keep going.

    • @baranvabaharan
      @baranvabaharan 3 ปีที่แล้ว +1

      @@LearnWebCode Thank you 😊🌻

  • @neelamchaubey28
    @neelamchaubey28 2 ปีที่แล้ว

    A big thank you for such an intuitive and easiest video on promises and async/await ever! ❤️💯

  • @dimitristsortanidis290
    @dimitristsortanidis290 2 ปีที่แล้ว +3

    The best tutorial on the topic that I have found so far.

  • @TetaroSeth
    @TetaroSeth 3 ปีที่แล้ว +7

    Hey Brad! I've completed your "Git a Web Developer Job" course and am currently about halfway through your Wordpress Developer course (Just finished the search overlay section).
    If you were to make a PHP Udemy course in the style of your JavaScript one I would buy it immediately.
    Thanks for the great courses, I really connect with your teaching style.

  • @shaderone07
    @shaderone07 3 ปีที่แล้ว +6

    You are absolutely one of the best coding instructors out there. Hope you reach millions!!!

  • @Pochinator
    @Pochinator 3 ปีที่แล้ว +6

    Amazing timing. Right while I'm in the middle of going through your React course. Really enjoying it! Your style of presentation is second to none sir.

  • @areyoukidding6274
    @areyoukidding6274 3 ปีที่แล้ว +1

    Hi brad, everything was going good for me till 34:27 . i am little confused. Need ur help.
    function delay(){
    const random = Math.random()*1000
    setTimeout(()=>{ },random)
    }
    this is enough to make the delay, right?
    async function getcats(){
    await delay()
    retun ["m", "p"]
    } => this piece of code return promise.
    why did u add this to delay function ?
    return new promise (()=>{
    setTimeout(()=>resolve(),random)
    });
    }
    i am confused when you explicitly written the word promise... Really2 need to your assistance 🙏🙏

    • @LearnWebCode
      @LearnWebCode  3 ปีที่แล้ว +1

      Hi 🙂, I created the delay function that returns a promise because JavaScript's built-in "setTimeout" doesn't return a promise, and I wanted to be able to use the await syntax within our getCats function. When you create a new promise you need to capitalize the P, as in "new Promise()".

    • @areyoukidding6274
      @areyoukidding6274 3 ปีที่แล้ว

      @@LearnWebCode thanx brad ❤️

  • @baranvabaharan
    @baranvabaharan 3 ปีที่แล้ว +2

    Teacher your cat is really cute 🥰
    Thanks for this video.
    Although English is not my native language I can understand you completely 😊

  • @alexroy4235
    @alexroy4235 3 ปีที่แล้ว +2

    Hi Brad, thanks for priceless tutorials. Can You please give your thoughts on Deno. Is is gonna replace nodejs soon???

    • @LearnWebCode
      @LearnWebCode  3 ปีที่แล้ว +2

      Deno is great, but I think most articles and videos covering it last year were opportunistic clickbait. As amazing as Deno is it's hard to even begin to describe how popular and established Node is. Even if Deno's future is incredibly bright I don't think it will "replace" Node anytime soon at all.

  • @prashanttanwar3261
    @prashanttanwar3261 3 ปีที่แล้ว +2

    Was waiting since long to understand callbacks from you

  • @LiveMusicPlease
    @LiveMusicPlease 2 ปีที่แล้ว +2

    Hey Brad, I could NEVER understand some of the js stuff until I found your full stack course on udemy, and until then, the JS world was just a huge mess to me. I seriously need to thank you for the knowledge you've been passing on, it can change lives and it has changed mine. Thanks!
    Ps. Your teaching style is awesome! wish there were more people like you out there

  • @OMARKM
    @OMARKM 2 ปีที่แล้ว +1

    I feel really lucky to have known your channel

  • @rajeshwarisn1155
    @rajeshwarisn1155 3 ปีที่แล้ว +1

    Thank you so much for this video I must say how lovely is that to have such a cute cat around, I am always curious and happy while watching your videos especially to have a glimpse of your cat 🐱 ❤

  • @Bevallalom
    @Bevallalom 3 ปีที่แล้ว +1

    I saw a cat -> I clicked... 😀

  • @utsikko
    @utsikko 3 ปีที่แล้ว +1

    Took your great WordPress course already back in 2018 and later enrolled in the JS and React courses. The best lecturer in Udemy in my opinion. Keep up the good 👍!

  • @gopuprakash160
    @gopuprakash160 10 หลายเดือนก่อน

    Hello Brad, I am coming from a ulti threaded world and the single threaded world Node.js is confusing me. How would Promise.all() work if Node js is single threaded?

  • @KnownTechnical
    @KnownTechnical 3 ปีที่แล้ว +1

    Thanks Brad, I was away on vacations. so now I have watched your content. Great Video Again

  • @ranaashraf5209
    @ranaashraf5209 2 ปีที่แล้ว +1

    Came for the cat

  • @avinashsudhanshu
    @avinashsudhanshu 3 ปีที่แล้ว +1

    It was actually everything.
    I watched dozens of videos, everyone had something and lacked something.
    This one was like summery of all of them.

  • @faheemsiddiqui2680
    @faheemsiddiqui2680 3 ปีที่แล้ว +1

    In past, I had gone through many tutorials to understand promise. But all my doubt get cleared in this 39 minutes. Thanx a lot from those one, who are self learner👌👍❤

  • @itsashley2690
    @itsashley2690 3 ปีที่แล้ว +1

    Thanks Brad!! Very beginner-friendly!! Thank you again!🙏

  • @krishnabala8403
    @krishnabala8403 3 ปีที่แล้ว +1

    Great explanation with relevant historical context! Thank you.

  • @jamesross5120
    @jamesross5120 ปีที่แล้ว

    how do you remember all this sh!t ? its hard enough working out how everything works

  • @chandansayed8745
    @chandansayed8745 3 ปีที่แล้ว

    Dear favorite tutor why don’t you build a mern todo app. Please

  • @BillBrutzman
    @BillBrutzman 2 ปีที่แล้ว

    Super Tutorial => Thanks very much.

  • @suong534
    @suong534 3 ปีที่แล้ว +1

    Thank you for the great lesson 😊

  • @edwardsheehan7008
    @edwardsheehan7008 7 หลายเดือนก่อน

    Very well put together, thank you very much

  • @CodingJourney
    @CodingJourney 3 ปีที่แล้ว +1

    Absolutely superb!! 🙂💙💙

  • @monitizedCode
    @monitizedCode ปีที่แล้ว

    Watched a few videos on this… brilliant teacher

  • @specialFuture-j9e
    @specialFuture-j9e 3 ปีที่แล้ว

    thanks sir for your contribution for our free work network

  • @nfm428
    @nfm428 3 ปีที่แล้ว

    Dislikes coming from folks who don't work in IT.

  • @christinamariehicks1078
    @christinamariehicks1078 ปีที่แล้ว

    dougys apt showtime auto..apt.3..

  • @orebelo
    @orebelo 2 ปีที่แล้ว

    Amazing video!! Congrats!

  • @mostafaabobakr
    @mostafaabobakr 3 ปีที่แล้ว +1

    Like for the KITTY 💖

  • @mysteriousmsn
    @mysteriousmsn 2 ปีที่แล้ว

    Best video on a TH-cam I Found, Cristal and clear.
    Callback, promises, async await and promises with then or await.

  • @wwgg1139
    @wwgg1139 3 ปีที่แล้ว

    at 23:00 if line 9 were to return allAnimals and line 10 was "}).then(superSecretOrder)" could you then have a pure function in superSecretOrder? i.e. one that can be tested independently of Promises?

  • @ameur1614
    @ameur1614 3 ปีที่แล้ว

    bro i cant handle how cute the cat is

  • @domd5841
    @domd5841 3 ปีที่แล้ว

    what mic are you using?

  • @christinamariehicks1078
    @christinamariehicks1078 ปีที่แล้ว

    no animals ..at all..apt 3..cat..

  • @christinamariehicks1078
    @christinamariehicks1078 ปีที่แล้ว

    carolyn smith ..becca ...

  • @sharad3877
    @sharad3877 2 ปีที่แล้ว

    I just wonder do you even know how good are you at teaching code...I think this can become a great youtube channel if you just upload videos regularly

  • @onelook1870
    @onelook1870 3 ปีที่แล้ว

    Please enable course download in your udemy wordpress course! I have limited internet......

  • @Muruwen
    @Muruwen ปีที่แล้ว

    i just clicked for the cat

  • @dhanyakumar8965
    @dhanyakumar8965 3 ปีที่แล้ว

    Thank you so much, which is very helpful,
    Last Friday I faced the same question from an interview, waiting for observables video

  • @johnravi3887
    @johnravi3887 2 ปีที่แล้ว

    Hi Brad,
    What an informational video! I really struggle with JavaScript, and your video will help me a lot. Thanks a lot for sharing this amazing video. I will be checking out the Codepen you shred in the description. I think I will be signing up for your courses as well. I have been trying to learn Javascript, and I really hope you can teach me all the important things, and how to use Javascript optimally. Thanks a lot for creating this amazing video. I learned a lot from this.

  • @hussainali186
    @hussainali186 3 ปีที่แล้ว

    we want redux from brad :)

  • @Pareshbpatel
    @Pareshbpatel 3 ปีที่แล้ว

    Great tutorial on Async JavaScript. Thanks.
    {2021-08-25}

  • @santhoshkumarmittapally5866
    @santhoshkumarmittapally5866 3 ปีที่แล้ว

    Great video. Will there be a chance where you can demo this in a unit test framework like jest which does not handle this promises well
    Or does not wait enough to complete the test. Jest uses fakeTimers which is even pretty confusing to understand along with jest advanceTimersByTime. This video is very helpful.

  • @dmbrv
    @dmbrv 3 ปีที่แล้ว +1

    Amazing :)

  • @tea42
    @tea42 ปีที่แล้ว

    Hey quick question. What mic do you use? Looks good!

    • @LearnWebCode
      @LearnWebCode  ปีที่แล้ว +1

      Thank you! This is the Shure SM7B.

  • @jonathanbell306
    @jonathanbell306 2 ปีที่แล้ว

    boggles the mind how with a complicated subject like this other teachers make it even more complicated than it need be, you however have done an excellent job here, fantastic thank you super helpful and straightforward

  • @Brad10
    @Brad10 2 ปีที่แล้ว

    I've watched a lot of other videos and couldn't quite understand the promises until this one. Thank you.

  • @firstignitor
    @firstignitor 2 ปีที่แล้ว

    thanks for the good work

  • @Geek888Video
    @Geek888Video 2 ปีที่แล้ว

    Great video, learning the concept of promises and the async and await. It is really helpfully.

  • @jipeejoce1353
    @jipeejoce1353 3 ปีที่แล้ว

    Impressive ! Like the 'behind the scenes' explanations to understand it .all :))

  • @mohamedawde9508
    @mohamedawde9508 3 ปีที่แล้ว

    I missed you Brad!

  • @ThuyNguyen-kh2en
    @ThuyNguyen-kh2en 3 ปีที่แล้ว

    I am learning callbacks and promises in javascript and this video helps me a lot to understand them. Thankyou so much!

  • @nitinkaushik5144
    @nitinkaushik5144 3 ปีที่แล้ว

    Hey Brad, You are the best teacher. Eagerly waiting for your Vue.js course.

  • @jirivitek9982
    @jirivitek9982 3 ปีที่แล้ว

    Simply the best teacher on youtube. I have bought almost all courses and I am just very mad at myself for not doing it earlier.

  • @developerrijan7880
    @developerrijan7880 2 ปีที่แล้ว

    It's a master piece
    Luckily got it... Thanks a lot

  • @victory_lucky
    @victory_lucky 3 ปีที่แล้ว

    thanks for this,
    BTW i have been trying to reach out to you recently, i have an offer i thought you did be interested in.

  • @shubhurana4616
    @shubhurana4616 2 ปีที่แล้ว

    Thnku very much

  • @danielyang2221
    @danielyang2221 3 ปีที่แล้ว

    perfect explanation. very impressive. thank you.

  • @Pareshbpatel
    @Pareshbpatel 2 ปีที่แล้ว

    {2021-12-26}, {2022-01-24}, {2023-03-18}

  • @cryptoshow1318
    @cryptoshow1318 2 ปีที่แล้ว

    Thankyou

  • @alejandroalcaide854
    @alejandroalcaide854 2 ปีที่แล้ว

    This is golden, dude. I feel so much gratitude :D

  • @igorr4682
    @igorr4682 3 ปีที่แล้ว

    Good stuff! Any chance you can do angular videos??

  • @DaveCollison
    @DaveCollison 3 ปีที่แล้ว

    Very handy and very instructional. Thanks, Brad.

  • @AyushPanditofficial
    @AyushPanditofficial 3 ปีที่แล้ว

    React with wordpress api lecture using graph ql

  • @subarnapokharel2218
    @subarnapokharel2218 3 ปีที่แล้ว

    Can I be able to do freelancing in web development if I follow brad schiff's all udemy and TH-cam courses or should i have to follow other peoples courses too?

    • @tamis5908
      @tamis5908 3 ปีที่แล้ว +3

      Brad is absolutely GREAT, but as a former university prof on a journey to full-stack webdev, I follow about 5 additional main instructors, covering a variety of topics. Each instructor tends to have an area they focus on, so find someone whose style you like who receives great udemy ratings, and then take their topic-specific bootcamp courses--whether thru udemy, freecodecamp "10 hrs of free whatever", treehouse, youtube channel crash courses, etc. Having overlap of content is good too--if you don't understand the way one person is teaching the concept, check out one of the others. Also, multiple sources helps give you a variety of projects to learn with and modify/expand on for your own portfolio--also sparks creative ideas for your own unique projects. My personal favorite instructors besides Brad Schiff are Jonas Schmedtmann, Maximillian Schwarzmueller, Andrei Neagoie, Andrew Mead, Stephen Grider. All are primarily back-end instructors, but for front-end, Jonas does a fantastic job. Other people recommend Angela Yu--she's good at both front and back-end. Colt Steele is also a favorite of many, though personally I find the pace he presents topics at a bit too slow for my preference--but he does provide HUGE amounts of practice for you. Do your research--there's lots of free and inexpensive resources out there. Oh yeah--another name that keeps popping up is Brad Traversy--backend. The other thing I would suggest is be sure you get exposure to a couple different MERN stack courses and also Data Structures & Algorithms(DSA). Ran into a couple great udemy courses on DSA--one by Scott Barrett which uses animated vids to help show DSA concepts, and another by Rob Merrill that provides pseudo-code hints to help you learn to use/write Javascript algorithms. Hope this helps! Good luck.

  • @shahriarparvezshuvo4760
    @shahriarparvezshuvo4760 3 ปีที่แล้ว

    Oh man.. She is soooooooo cute. I came here to see her. 💖

  • @MilanDrazic
    @MilanDrazic 3 ปีที่แล้ว

    The sky is blue. this is bad. 😂

  • @rangabharath4253
    @rangabharath4253 3 ปีที่แล้ว

    Awesome as always 👍😀

  • @unpluggedaman
    @unpluggedaman 3 ปีที่แล้ว

    Thanks a lot

  • @techkoda
    @techkoda 3 ปีที่แล้ว

    Here for the algorithm(I'm a python, PHP/Laravel dev). Thanks Brad, this channel is so underrated.

  • @fezanbhatti1292
    @fezanbhatti1292 2 ปีที่แล้ว

    I purchased your 3 courses on Udemy and now started taking the JavaScript full-stack" course. I have done lots of practice during my professional career but most of the time without understanding (Copy and Paste) or quick fix, but now understanding concepts to write reliable, better, and industry-standard code. Thanks and appreciate your efforts. Keep doing, God bless you and my great America.

  • @11valdano
    @11valdano ปีที่แล้ว

    9:20 cat in the background :)