• Sunday , 31 May 2020

JavaScript ES6 / ES2015 – [10] Promises

Code Canyon



In this video I will show you how to use promises to deal with asynchronous data in JavaScript ES2015

Source Code – https://github.com/bradtraversy/youtube_es2015_source/tree/master/09_promises

CHECK OUT MY ES2015 COURSE: https://www.eduonix.com/affiliates/id/16-10397

Original source

3d Ocean

Related Posts

42 Comments

  1. Avadhut #
    January 20, 2019 at 13:57

    Best promises made ever

  2. Skeptyle
    January 20, 2019 at 13:57

    This explanation is shit, you don't even need the promise code for async requests

  3. Abdul Hadi
    January 20, 2019 at 13:57

    You're just coding and not explaining anyting!

  4. Garry Lowther
    January 20, 2019 at 13:57

    Really good practical video, thanks for posting.

  5. Keoma Mallett
    January 20, 2019 at 13:57

    I am getting the following error:

    "Failed to load http://jsonplaceholder.typicode.com/todos: The 'Access-Control-Allow-Origin' header has a value 'null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access."

    Can anyone help?

  6. DagicCross
    January 20, 2019 at 13:57

    nice api parser

  7. Slevin Pilgrim
    January 20, 2019 at 13:57

    Why have then((success)=>{…}, (fail)=>{…}) if the fail part is never used? Nobody is using the fail, any error handling is in the catch. But why have the fail function in the then? What does it do?

  8. Steve Butler
    January 20, 2019 at 13:57

    Still not sure I fully understand promises, but thanks for the API example. I have been struggling with an idea for a while and your example got me going. Was able to authenticate and pull data from the API and put it into the page. Baby steps for sure, but dang it feels good to at least be moving. Thanks for the great videos.

  9. Viแป‡t Anh Vลฉ
    January 20, 2019 at 13:57

    Thanks for this tutorials. Really helpful

  10. Timur Akhalaya
    January 20, 2019 at 13:57

    Anyway, it feels like that dude is not a coder. If you are going to use that code with a POST method , it won't work. Guess why . little hint (with POST we send data to a server )

  11. dhg1234
    January 20, 2019 at 13:57

    Brad, can you also add in a segment relating to async & await functions?

  12. Snurfish
    January 20, 2019 at 13:57

    Thank you, needed a refresher on this subject. It was a helpful video for me.

  13. alienfetuseater
    January 20, 2019 at 13:57

    good video, hard to concentrate with the second window taking up so much room on the screen though.

  14. ALL WP Stores
    January 20, 2019 at 13:57

    Well explained. Thanks a lot. Those who don't understand you guys need to learn about XHR and Ajax

  15. The Star
    January 20, 2019 at 13:57

    Didnt understand this at all dear Brad. You just typed the codes ๐Ÿ™‚

  16. Rich L.
    January 20, 2019 at 13:57

    Ugh…ohh boy, gonna have to watch this a few times to get my head around. I feel like I must have missed out on a previous lesson. Cool stuff though I guess…once you understand how it all goes together. Just starting on Node.js.

  17. TaylorA Buckner
    January 20, 2019 at 13:57

    Gol Durnit Bradley, you did it again.

    Spent 20 min searching for a dead simple explanation of promises for a particular issue I was having. Watched 5 minutes of your video and 'resolved' my issue.

    Thanks again bro-town.

  18. Daniel Laera
    January 20, 2019 at 13:57

    Hi Brad , thx for the tutorial so accurate! please in the future could you make more ES6 / ES7 syntax/concept tutorial? we appreciate that, thanks so much for your work

  19. Awais fiaz
    January 20, 2019 at 13:57

    somewhere you are using 'this' elsewhere using using 'xhr' not even clear in your code why used this and why used xhr very confusing

  20. Awais fiaz
    January 20, 2019 at 13:57

    the very first dislike i am going to pass to this channel only code no explanation -_-

  21. Darren1337
    January 20, 2019 at 13:57

    It works and I have no idea why, lol.

  22. Mohamed Elmdary
    January 20, 2019 at 13:57

    the best ever !

  23. synetic707x
    January 20, 2019 at 13:57

    This is more of a tutorial on how to parse a website ..

  24. Full Stack
    January 20, 2019 at 13:57

    I've just finished building an online workshop for testing TraversyMedia video series on learning JavaScipt ES6

    Online demo: https://medunes.net/es6-training/
    Github Repo: https://github.com/MedUnes/es6-training

  25. escapiststupor
    January 20, 2019 at 13:57

    what is the difference between
    .then(successCallback,failureCallback)
    and
    .then(successCallback).catch(failureCallback)

  26. Recoded Labs
    January 20, 2019 at 13:57

    Question is when and why will you use a promise?

  27. Leamsi Ordnavi
    January 20, 2019 at 13:57

    thanks ๐Ÿ™‚

  28. Anil Katakam
    January 20, 2019 at 13:57

    no explanation. just typed code.

  29. Munir Hoque
    January 20, 2019 at 13:57

    Writing code without any sort of explanation what is happening. First down vote in my entire life

  30. Resit Korsu
    January 20, 2019 at 13:57

    Now Angular makes more sense, thank you.

  31. Daniel Weikert
    January 20, 2019 at 13:57

    I am new to javascript. This ES6 has more familiarity with java and python than with jquery. Should I learn this for webdev or
    is there another javascript version (angular,… sorry don't know what that is so far) which is higher in demand? Thanks

  32. vladanng
    January 20, 2019 at 13:57

    Keep like that, ass everything, BUT SIMPLE, EVERYONE CAN UNDERSTAND ๐Ÿ™‚ ! Super.

  33. Cezary Gruca
    January 20, 2019 at 13:57

    Great tut, thanks ๐Ÿ˜‰

  34. Olga
    January 20, 2019 at 13:57

    great tutorial, thanks ๐Ÿ™‚

  35. Deepak Londhe
    January 20, 2019 at 13:57

    the same is done behind the function Ajax?

  36. Husain Ahmmed
    January 20, 2019 at 13:57

    Thanks. It's awesome

  37. Valijon Rahimov
    January 20, 2019 at 13:57

    Niiiiice! Thanks.

  38. Cesar SC
    January 20, 2019 at 13:57

    When I think about Javascript, the name I remember is Brad ๐Ÿ˜‰

  39. Chrisdraws1
    January 20, 2019 at 13:57

    This was one of the best and simplest tutorials I've seen so far. Very appreciative.

  40. Dmitry Litvinov
    January 20, 2019 at 13:57

    Shit… I'm getting error:
    ๐—ฉ๐— ๐Ÿฎ๐Ÿฌ๐Ÿฑ๐Ÿณ:๐Ÿญ๐Ÿฌ ๐—จ๐—ป๐—ฐ๐—ฎ๐˜‚๐—ด๐—ต๐˜ ๐—ง๐˜†๐—ฝ๐—ฒ๐—˜๐—ฟ๐—ฟ๐—ผ๐—ฟ: ๐—–๐—ฎ๐—ป๐—ป๐—ผ๐˜ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ ๐—ฝ๐—ฟ๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜๐˜† '๐˜€๐˜๐—ฎ๐˜๐˜‚๐˜€' ๐—ผ๐—ณ ๐˜‚๐—ป๐—ฑ๐—ฒ๐—ณ๐—ถ๐—ป๐—ฒ๐—ฑ(โ€ฆ)
    on this line:
    ๐—ถ๐—ณ(๐˜๐—ต๐—ถ๐˜€.๐˜€๐˜๐—ฎ๐˜๐˜‚๐˜€ >= ๐Ÿฎ๐Ÿฌ๐Ÿฌ && ๐˜๐—ต๐—ถ๐˜€.๐˜€๐˜๐—ฎ๐˜๐˜‚๐˜€ < ๐Ÿฏ๐Ÿฌ๐Ÿฌ) {
    This code is inside ๐ฑ๐ก๐ซ.๐จ๐ง๐ฅ๐จ๐š๐ function.
    What should I do?

  41. maciekzx
    January 20, 2019 at 13:57

    best javascript promises tutorial so far

Leave A Comment

You must be logged in to post a comment.