Callbacks, Promises, Async Await | JavaScript Fetch API Explained

Ғылым және технология

Learn about Callbacks, Promises, and Async Await as the JavaScript Fetch API is explained in this tutorial. You will also learn about thenables and how async / await replaces them in our JS code. The first 30 minutes covers the concepts. The last 30 minutes gives examples of retrieving data from different APIs with Fetch.
▶ This video is part of the JavaScript Tutorials for Beginners Playlist found here: • Javascript Tutorials f...
Subscribe ➜ bit.ly/3nGHmNn
✅ Quick Concepts outline:
Fetch API with Async / Await
(0:00) Intro
(0:29) What is a callback function?
(1:15) What is the problem with callbacks?
(3:00) JavaScript Promises have 3 states
(5:28) A promise may not return a value where you expect it to: You need to wait for a promise to resolve
(6:58) Using thenables with a promise
(20:15) An easy mistake to make with promises
(24:00) Creating an async function
(25:00) Applying await inside the function
(33:45) Example 1: Retrieving user data
(40:00) Example 2: Retrieving dad jokes
(47:00) Example 3: Posting data
(49:40) Example 4: Retrieving data with URL parameters
(54:55) Abstract it all into single responsibility functions
🤖 APIs used in the examples for this tutorial:
• jsonplaceholder.typicode.com/
• icanhazdadjoke.com/
• httpbin.org/
• www.icndb.com/api/
📚 Further Reading:
MDN Web Docs:
Using Fetch: developer.mozilla.org/en-US/d...
Making asynchronous programming easier with async and await: developer.mozilla.org/en-US/d...
The Promise Object: developer.mozilla.org/en-US/d...
Thenables: developer.mozilla.org/en-US/d...
Eloquent JavaScript, Chapter 11: eloquentjavascript.net/11_asy...
✅ Follow Me:
Twitter: / yesdavidgray
LinkedIn: / davidagray
Hashnode: yesdavidgray.hashnode.dev/
Reddit: / daveoneleven
Was this tutorial about the JavaScript Fetch API, Async/Await, Promises, Thenables, and Callbacks helpful? If so, please share. Let me know your thoughts in the comments.
#async #await #fetch

Пікірлер: 270

  • @danielgolden90
    @danielgolden902 жыл бұрын

    You make some of the most clear, well planned, well organized tutorials on JS on all of KZread. Truly one of the most underrated JS tutorial channels. I've received so much benefit from your videos over the past few weeks that I can't not say thanks in some way.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome, Daniel! 🙏

  • @caiqueludemann5123

    @caiqueludemann5123

    Жыл бұрын

    Now that is a thank you anyone will appreciate. haha

  • @pranavkastury9610
    @pranavkastury9610 Жыл бұрын

    This is a criminally underrated tutorial. The way all of this is explained is so good! I've taken so much out of this video and I'll be revisiting individual sections for reference down the line. Thank you so much, Dave!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're very welcome, Pranav!

  • @msilveirabr

    @msilveirabr

    11 ай бұрын

    Amem to that! I'm able to listen to him and follow without subtitles! Great teaching capacity. Totally underrated!!!!❤

  • @weizhang2389
    @weizhang23893 жыл бұрын

    Most underrated channel

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you!

  • @danielgolden90

    @danielgolden90

    2 жыл бұрын

    100%

  • @johnmcaulay4348
    @johnmcaulay43482 жыл бұрын

    another top class video mate, well done. I like two things about your videos: 1) The way your videos are so clearly explained. 2) The fact you go a little deeper into most topics than the other KZreadrs out there.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you John. I sincerely appreciate the detailed feedback you just provided. I will make efforts to continue to do both of these! 🙏🚀

  • @iDreamOfOkra
    @iDreamOfOkra2 жыл бұрын

    I've decided to only learn languages that Dave has tutorials for! Thanks for yet another amazing and clear tutorial!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Glad I could help, Tamim! 🙏💯

  • @coderjag8828
    @coderjag88282 жыл бұрын

    I've watched about 4-5 different videos on promises and sync/await, but this one really tied it all together for me and helped me understand these concepts. I like how you go in depth about the little things (etc. explaining how the parameters put into functions don't have to have the same name as the actual parameter that you're going to insert when calling the function). That makes your videos easy to follow by even absolute beginners. Don't change your teaching style! Keep it up!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you! 💯

  • @yatin1370
    @yatin13705 ай бұрын

    Revisting this and I am glad I now understand everything said in this video to appreciate how wonderful this tutorial is. Thanks Dave 🤓

  • @dboulos7
    @dboulos7 Жыл бұрын

    Brilliant Dave - a lot of of tutorials only explain what works, but never what doesn't work and why. You offered such a comprehensive understanding of the principles of promises and async/await, and when and where to use them. Thank you immensely!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad it helped!

  • @pliniojr95
    @pliniojr952 жыл бұрын

    I've seen a lot of tutorials about promises and async/await. But this one is probably the best one i've ever seen so far, because you used examples with actual data instead of using setTimeout, since this is what we future programmers will see in the wild. Thank you for the video, Dave! Greetings from Brazil.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome! And hello to Brazil! 💯🚀

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars9 ай бұрын

    wow, simply mind blowing dave, you're amazing the video is 2 years old so only the aesthetics(colorscheme, font, etc) differ compared to today but the quality content is still the same also, another thing popped while watching the video was you explained the then and catch methods for resolve and reject but in async await you can catch resolve and reject using try catch block I had no idea about the Accept header type and never seen text/plain type either, thank you once again dave :)

  • @Ettrix
    @Ettrix2 жыл бұрын

    This is the perfect amount of "in-depth", covers almost all aspects/use cases, without branching too far out of scope

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Glad to hear it! 🙏

  • @CynthiaSotoCaballerolYEAHl
    @CynthiaSotoCaballerolYEAHl3 жыл бұрын

    Best explanation on this topic on KZread. Thanks Dave

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Wow! Thank you for the kind words 🙂

  • @hindihits9260
    @hindihits92602 жыл бұрын

    This video is an absolute treasure! Great explanation and examples! I am now comfortable with apis. Thank you so much Dave

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome!

  • @Anbaraen
    @Anbaraen2 жыл бұрын

    Late to the party but I've watched a lot of people explain promises and async/await and this is the first one that took the time to explain some of the common pitfalls when working asynchronously. You've got my follow!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you! 🙏

  • @mschwanitz
    @mschwanitz Жыл бұрын

    Finally understand async/await. Every tutorial on YT just shows how to console log everything. This was very helpful to see how to actually DO SOMETHING with the stuff we get back.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad it helped!

  • @waqaskhandev
    @waqaskhandev Жыл бұрын

    I have watched so many videos and never understood these topics the way you explain it. Now I completely understand how all these works. It is still so much worth Tutorials. ThankYou so much, Dave.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome!

  • @GG-hl4zp
    @GG-hl4zp Жыл бұрын

    I've been a full stack dev for over 3 years and your course helped me a lot. Thank you Dave.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad to hear that! 💯

  • @aeronwolfe7072
    @aeronwolfe7072 Жыл бұрын

    awesome video. the section on promises... thank you! i finally get it! ive watched several videos on the topic, but still just didn't quite have the right mental model! but the way you constructed the promise with resolve and reject, THAT made it click for me!!!! thanks again!!! very well done!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad to hear that!

  • @nemac23
    @nemac232 жыл бұрын

    Amazing tutorial, Dave! You explained the topic very thoroughly. The pace was also very easy to follow, and the practical examples and insights into workflow really bring it all together. 10 / 10, Thank you!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're very welcome! 💯🚀

  • @jipeejoce1353
    @jipeejoce13533 жыл бұрын

    Great tutorial Dave ! Hope you can teach us some JS frameworks or some back-end with node in the near future. Anyway, thanks to deliver your knowlegde to the world and stay safe.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thanks! More stuff in the works. I appreciate your suggestions!

  • @necipyayla639
    @necipyayla6392 ай бұрын

    This tutorial series has been changed my software life, ı have couldn't understand from other javascript teacher's, until I find you, Thank you so much Dave :)

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 ай бұрын

    Glad I could help!

  • @focusiam2027
    @focusiam2027 Жыл бұрын

    You've got amazing tutorials, you're making a change in the community. Thank you Dave!!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you! I really appreciate your feedback! 💯

  • @jomamma269
    @jomamma2692 жыл бұрын

    Just wanted to say thank you for posting this tutorial. I'd been stuck on understanding promises and the whole sync/asynchronous concept for around 4 months. This had been a major roadblock for me in learning node for backend, so this has really helped a lot. I'm still not 100% clear, but this vid has really helped me progress my understanding. Thanks again.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Glad it helped! 💯🚀

  • @jomarnavarro7

    @jomarnavarro7

    11 ай бұрын

    @@DaveGrayTeachesCode how do you use the console within VS Code? is it a plugin?

  • @CondeAlberto
    @CondeAlberto2 жыл бұрын

    A lot of information today. It branches out into many other subjects: - APIs, the importance of reading documentation, and of course the backend, etc... Thank you again Dave for all your work, so that we may learn. Until the next one.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you, Alberto! 🙏

  • @Jazz__Dev
    @Jazz__Dev Жыл бұрын

    2 years down the line and your tutorials are saving the day... I really your videos man...

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you!

  • @pcodes
    @pcodes2 жыл бұрын

    Learnt a lot of things from your tutorials Dave ✨. You're a magnificent teacher. A teacher I always wished but never had. You make things so clear and easy to understand without compromising the quality and minute details. Keep up the great work Man! We need more people like you. Have a great day Dave.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you for the kind words, Pawel! 🙏🙏

  • @nelsonakujiobi4659
    @nelsonakujiobi46599 ай бұрын

    This is some good stuff. You've really helped my coding journey. Thanks a lot maestro

  • @MistaAlon
    @MistaAlon8 ай бұрын

    Absolutely phenomenal tutorial

  • @constantine9074
    @constantine9074 Жыл бұрын

    Im watching other videos over and over but i understand only your explanations :) , well maybe others helped a little bit too, but only with your channel i understand truly, thank you

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome!

  • @kostiantynkarzhanov9216
    @kostiantynkarzhanov9216 Жыл бұрын

    Awesome tutorial! The explanations were very clear and the examples were incredibly helpful in understanding the concepts. Thank you so much for sharing your expertise, Dave! 💛

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome!

  • @stephenw2671
    @stephenw26718 ай бұрын

    Excellent tutorial. Thanks!

  • @nigelflim
    @nigelflim2 жыл бұрын

    Bar none the creme de la creme Asynchronous Javascript video I've ever seen on youtube. U definitely deserve more subs. Thanks heaps!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you for the kind words, Nigel! 🙏🙏

  • @themixmaster
    @themixmaster2 жыл бұрын

    Thanks a lot man, best explanation on whole youtube, if not on internet!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Glad I could help, and thank you for the kind words 🙏

  • @vladislavamarkova8379
    @vladislavamarkova83792 жыл бұрын

    Great tutorial! Understandable, interesting and really good explanation! Thank you!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome! 💯

  • @hongzhonghu6364
    @hongzhonghu63642 жыл бұрын

    Thanks for the detail explanation. Your example perfectly solved my confusion regarding with async await when it comes to the working order!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Glad to hear that! 💯🚀

  • @abhijeetmokale5604
    @abhijeetmokale56043 жыл бұрын

    Keep it up man .....your way of explaining things is awesome .... you're gonna go very far...Thanks For the video !

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you! 🙏💯

  • @AntonioSantos-ve6zv
    @AntonioSantos-ve6zv2 жыл бұрын

    This is thorough and to the point. Thank you!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Glad it was helpful! 🚀

  • @buithutruc
    @buithutruc Жыл бұрын

    Thank you so much for all your tutorials. I've learned a ton from you.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're very welcome!

  • @TheJohnny966
    @TheJohnny9663 жыл бұрын

    Just got to know your channel. Nicely explained and good content! Subscribed

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you!

  • @gektorix
    @gektorix Жыл бұрын

    Thanks Dave for a great guide to asynchronous functions.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome! 💯

  • @msilveirabr
    @msilveirabr11 ай бұрын

    I don't usually hit like in 99% of the videos I watch... You totally deserve to be on my 1%. Subscribed to the channel AND all your videos are getting a like. Thank you very much! Now to the 8h js video to learn what i missed since DHTML was a thing 😂😂😂

  • @yandyvieramonteserin9458
    @yandyvieramonteserin9458 Жыл бұрын

    This tutorial is so good that at the end I was expecting something like: aha now you have to pay this is not for free. Thank you so much!!!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Now that you mention it: www.buymeacoffee.com/davegray ☕☕☕ 😆 Seriously though, I'm just glad it helped you out. (...but I do like coffee)

  • @danielhakmeh938
    @danielhakmeh938 Жыл бұрын

    i am glad i passed by this tutorial. you have just made dummy learn. thanks:)

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad I could help!

  • @AunSyedShah
    @AunSyedShah Жыл бұрын

    Sir Dave, please keep teaching us with this dedication.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    I plan to keep going! 🚀

  • @BURBXN
    @BURBXN3 жыл бұрын

    Thanks for the very thorough explanation. You've earned a subscriber.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    You're welcome!

  • @Grihlo
    @Grihlo Жыл бұрын

    Thank you for another video Dave! Honestly this is much more complicated for me compared to all the previous lessons.. I have a feeling that I've missed some previous lessons and that's why I can't understand completely what's going on, but in fact I was following all the previous lessons. I might need to read more about thiese subjects and rewatch the video.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome, Grigory! Yes, this topic is complex. We are working with outside data sources that we request data from. We need to await that data in our application before we can do something with it. May be a good one to review twice. 🚀 Keep up the good work!

  • @Grihlo

    @Grihlo

    Жыл бұрын

    @@DaveGrayTeachesCode thanks a lot for your support! Surely I will watch it again (and most likely more than 1 time). I understood the first part of the video, but then at some point I just got lost and untill the end it was all just clear as mud :) (as you said in the video).

  • @sudhansusatyam5835
    @sudhansusatyam58352 жыл бұрын

    This is most clearly explained video about promise,async and await in JavaScript keep making such clear tutorial Thank you so much

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you for the kind words 🙏

  • @dennismutemi7991
    @dennismutemi79914 ай бұрын

    well explained,,thanks

  • @darbenshitrit3589
    @darbenshitrit35892 жыл бұрын

    Amazing and clear explanation thank you so much!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome! 🙏🚀

  • @ediagbonyaaiyudubie1097
    @ediagbonyaaiyudubie1097 Жыл бұрын

    I love the way you take your time to explain. God bless you.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you!

  • @mazenmostafa2351
    @mazenmostafa23517 ай бұрын

    thank you it is really a helpful tutorial

  • @shubhsagar6234
    @shubhsagar62343 жыл бұрын

    Thanks so much... Clearly explained

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    You're welcome!

  • @manuaelheav1322
    @manuaelheav13223 жыл бұрын

    Great Content! Watched your video on Traversy Media too. Beautifully explained. Subscribed.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you for the kind words and for subscribing!

  • @_ademmeral
    @_ademmeral Жыл бұрын

    I love details

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Right on!

  • @webdev8313
    @webdev8313 Жыл бұрын

    Great video Sir, this playlist helped me a lot. Thank you!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're very welcome!

  • @coinpumpinfo
    @coinpumpinfo2 жыл бұрын

    Thanks for the tutorial!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome!

  • @HotSteamingJustice
    @HotSteamingJustice3 жыл бұрын

    Thanks for the brilliant tutorial.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    You're welcome!

  • @yoskokleng3658
    @yoskokleng36582 жыл бұрын

    I already subscribed you and also share this video to my friends. you're the best teacher. Thanks so much... Clearly explained. thanks and thanks and thanks... < 3

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you, Yos! 🙏💯🚀

  • @romanr5962
    @romanr59622 жыл бұрын

    Yet another HQ tutorial, thank you Dave!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome, Roman! 💯

  • @haisezarate1614
    @haisezarate1614 Жыл бұрын

    You are very good at explaining, these topics are clear to me.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad to hear that! Thank you!

  • @yekaterinacrawford2037
    @yekaterinacrawford20372 жыл бұрын

    Hope you get more views and subscribers! Your content is priceless!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you! 🙏💯

  • @cetinsangudev2563
    @cetinsangudev25632 жыл бұрын

    God bless you Mr. Dave. You are the best.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you! 🙏🙏

  • @tiqlol
    @tiqlol8 ай бұрын

    Dave is saving my life

  • @elvispontes4165
    @elvispontes4165 Жыл бұрын

    The best teacher on the youtube, hands down!!!.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you for the kind words! 🙏

  • @vinkim2802
    @vinkim2802 Жыл бұрын

    The best explanation ever!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad it helped!

  • 2 жыл бұрын

    Great video! Keep up the good work.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you, Marko 🙏💯

  • @CODEABC
    @CODEABC3 жыл бұрын

    Most underated channel but for sure it will grow up with huge ammount of programmer.watching your video only for judge but you got my subscrobe🔥

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you! 🚀

  • @danielakoyleek3757
    @danielakoyleek3757 Жыл бұрын

    Great teacher. Many thanks

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You are welcome!

  • @proexpert6325
    @proexpert6325 Жыл бұрын

    You are really a talented teacher. God bless you sir

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you!

  • @omoleyeosadare5775
    @omoleyeosadare57755 ай бұрын

    Dave thank you 🙏🏿 🙏🏿

  • @tonhom260
    @tonhom2602 жыл бұрын

    Thank you so much ❤️❤️

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome! 🙏💯

  • @amirhosseinghaznavi6657
    @amirhosseinghaznavi6657 Жыл бұрын

    Wonderful, people will get the value of this man “Dave” over time…🧠

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you!

  • @OlehBiblyi
    @OlehBiblyi3 жыл бұрын

    Great tutorial!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thanks!

  • @dleonardo8755
    @dleonardo87552 жыл бұрын

    THANKS LEGEND

  • @srinivasbharadwaj6128
    @srinivasbharadwaj61282 жыл бұрын

    Thank you so much Dave.. crystal clear explanation for beginners on Asynchronous topic. Is there any chance for angular tutorial just want to learn from your tutorial ❤️

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome and thank you for asking. Angular is not my current focus.

  • @melhemhamade4210
    @melhemhamade42102 жыл бұрын

    Great. thank you.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome!

  • @OneworldKW
    @OneworldKW Жыл бұрын

    Thanks for sharing this.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome!

  • @zenguitarankh
    @zenguitarankh Жыл бұрын

    Dude...once again you come through on crushing the course I bought on Udemy....I'm finishing it because I started it (As the words of Van Halen taught us) but the wrong course/instructor can make you wonder if you can hack it and make that big switch. Then I come to your videos to understand the concepts better, feel much better and get my confidence back. It's nothing against them...they're very knowledgeable but some know how to convey it better. Lets just say I know who's getting my money next time. Thanks man.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you! I am working towards a premium course of my own. I won't put it on Udemy though. Stay tuned here: courses.davegray.codes/

  • @mandelaakosu139
    @mandelaakosu1393 жыл бұрын

    Alot thanks, u are great 🥰

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you! 🙏💯

  • @plaguegames3556
    @plaguegames35562 жыл бұрын

    I just love you man

  • @mustaphachqoubi
    @mustaphachqoubi2 жыл бұрын

    the best explanation ever

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you for the kind words! 🙏🙏

  • @user-dh8rm3ob4f
    @user-dh8rm3ob4f Жыл бұрын

    Awesome explanation Dave, just one small thing, it would be nice if you also show us how you search for the api documentation and all, so that the beginners would know how to do it.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    I just Googled for APIs and found some different ones. Many exist. When you find them, look at the documentation for each.

  • @dr_corrupt1014
    @dr_corrupt1014 Жыл бұрын

    awsome explanation bud

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Glad it helped

  • @vikaschauhan6442
    @vikaschauhan64422 жыл бұрын

    Nice explanation 👌

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Thank you, Vikas 🙏

  • @zltg.mn0ng99
    @zltg.mn0ng99 Жыл бұрын

    my favorite tutor 😁😁

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thank you!

  • @taiwoojo7638
    @taiwoojo76383 жыл бұрын

    Great teacher

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Thank you for the kind words :)

  • @theunknownclone8084
    @theunknownclone80843 жыл бұрын

    Great explanation ;)

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    Glad you liked it! 💯

  • @brenobcsilva
    @brenobcsilva3 жыл бұрын

    Muito obrigado!!

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    You are welcome!

  • @mehdimersoul1865
    @mehdimersoul1865 Жыл бұрын

    good explaination

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    🙏🙏

  • @rangabharath4253
    @rangabharath42533 жыл бұрын

    Awesome

  • @shineLouisShine
    @shineLouisShine Жыл бұрын

    Thank you for the informative lesson. Although, it feels SO important that I wish it would have come with exercises for practicing the principles...

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome! I suggest practicing making some of your own requests to the APIs shown in the last half of this tutorial as well as some other public APIs.

  • @shineLouisShine

    @shineLouisShine

    Жыл бұрын

    ​@@DaveGrayTeachesCode ​ ​ How can one approach any website out there to read information and once it arrived - to work with it indipendetly? ...Beside the fact that it seems that each request to reach other websites is responded by error messages (mostly about... CORS?) So... while those tools in the video works with both sites, And the principles themselves are crucial to get familiar with - I haven't been equipped yet with the knowledge of how to execute and handle with a parsing from websites... Do following lessons include this topic?

  • @_rachid
    @_rachid3 жыл бұрын

    Thank you.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    You're welcome!

  • @_rachid

    @_rachid

    3 жыл бұрын

    @@DaveGrayTeachesCode I am a newbie web developper and I appreciated your way of teaching. I salute you from Morocco.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    @@_rachid thank you. That's great!

  • @nikolozmacharashvili1212
    @nikolozmacharashvili1212 Жыл бұрын

    man thank you for this clear, moderate tempo, explanation of everything. Im going to subscribe to your channel, and check out your other videos too

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You're welcome! 💯

  • @delphinelisabeth
    @delphinelisabeth2 жыл бұрын

    instead of map at 35:09 could you have used optional chaining? Great tutorial.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Good question. I had to go back and look as it has been months since I made the tutorial. At the 35:09 reference point, I'm not sure what you would want to attempt to chain? The higher order function map() will return a new array with the new values. I say give it a shot and watch the console to see if it works out for you! 🚀💯

  • @ahmedhayelmouhit6649
    @ahmedhayelmouhit6649 Жыл бұрын

    You're greate buddy

  • @ahmedhayelmouhit6649

    @ahmedhayelmouhit6649

    Жыл бұрын

    #great

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    Thanks!

  • @Odisej1
    @Odisej12 жыл бұрын

    Jesus Christe...finaly somebody explain what is going on with return in then. Thank you sir. Greath tutorial.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    You're welcome! 💯🙏

  • @Odisej1

    @Odisej1

    2 жыл бұрын

    @@DaveGrayTeachesCode I realy mean it. I spent whole week battleing with return value in async. Very, very good tutorial.

  • @colindante5164
    @colindante51642 жыл бұрын

    Thankyou for such an in depth explanation. Using the fetch API I could inject data into an but how does one go about marking up the data with HTML tags and styling it with CSS after injection? Thankyou much.)))

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    s represent a nested browsing content (see MDN: developer.mozilla.org/en-US/docs/Web/HTML/Element/) ...so you can only change the content in an if it is yours - not the content of another site you load into the . If you were loading your own content, I'd suggest just working with that file directly instead of going from the parent to the file in the . I did find a link that references pop-ups instead of s, but the content may apply. It shows how to create a new document and reference it from the parent: javascript.info/popup-windows

  • @colindante5164

    @colindante5164

    2 жыл бұрын

    @@DaveGrayTeachesCode I'm sorry I never explained myself. I'm creating links to display individual chapters of a book (the Bible) into an . I'll be creating around 1200 links. The Bible contains approximately 1200 chapters and I reckon there are a few ways I could inject each chapter into an . However, once a chapter loads into the it will a navigational bar that references verse numbers in the chapter. So the HTML markup and styling needs to be done prior to injection. Retrieving data from the database in JSON format doesn't have the HTML and CSS markup. How do I proceed? What are my options? Once again I'm so grateful and thankful for your input.

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    With this all being your pages, I would still avoid an . You can delete and add elements to a page with Javascript. This creates dynamic content which is what it seems you are describing. Look into creating the parts of the page you want to display with document.createElement(). From there, you can set textContent, add CSS classes, and everything else.

  • @colindante5164

    @colindante5164

    2 жыл бұрын

    @@DaveGrayTeachesCode Your advise has saved me headaches down the line and once again I thankyou for it. )))

  • @reezus_
    @reezus_ Жыл бұрын

    Wonderful series so far. I'm a bit confused with the firstName , lastName and category parameters. Are they specific for that particular url. Or can i just create random parameters for any URL. I would've checked the api but it seems to be no longer active. Looking forward to your response:)

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    Жыл бұрын

    You can name parameters for a function whatever you like. However, if an API says it requires specific parameter names, you need to use those. Yes, one of the APIs I used in this tutorial is no longer active.

  • @DucMinhTeaching
    @DucMinhTeaching3 жыл бұрын

    Thanks Dave, I wonder how fetch() is different from $.getJSON( "/details.php", function( resp ){} in Jquery? Or are they just the same?

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    jQuery is definitely different from using the Fetch API although the similarity is requesting data. I avoid jQuery when possible these days, but it is definitely still out there in legacy code. You can look at the differences by comparing the MDN Fetch API details (developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to the jQuery getJSON details (api.jquery.com/jquery.getjson/).

  • @DucMinhTeaching

    @DucMinhTeaching

    3 жыл бұрын

    @@DaveGrayTeachesCode would you recommend using jQuery for simple interaction on the web?

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    3 жыл бұрын

    @@DucMinhTeaching no I avoid it when possible these days. I prefer Vanilla JavaScript for everything that jQuery used to be used for.

  • @designcoded7585
    @designcoded75852 жыл бұрын

    first time seeing peoples do post request using fetch because many of the developers and youtubers out there always uses axios

  • @DaveGrayTeachesCode

    @DaveGrayTeachesCode

    2 жыл бұрын

    Yes, I have avoided npm packages in these beginner tutorials. Axios is good and I'm adding it into my Learn React series. 💯🚀

Келесі