• Friday , 20 October 2017

Promises – Part 8 of Functional Programming in JavaScript

Code Canyon

Promises are, just like callbacks, a way of dealing with things being asynchronous – when we don’t know for certain in what order things will happen. But promises are more powerful than callbacks because they compose – you can combine promises and chain them, all kinds of cool stuff – I’ve showed you some in this video, but there is WAY more you’ll be able to do when you get comfortable with promises.

Full code example from the video here:

Much inspiration for this episode was drawn from this fantastic guide y mattdesl:

Original source

3d Ocean

Related Posts


  1. Alexandre Amaral
    August 9, 2017 at 07:05

    Fantastic video, congratulations.

  2. Idalia Ramos
    August 9, 2017 at 07:05

    Just started a coding bootcamp in SF! Pretty intense, fist time learning to code. Your videos are my favorite so far, thanks for making me laugh and learn every time 🙂

  3. Eric Mumford
    August 9, 2017 at 07:05

    I'd like more Promises examples of pattern-based approaches to big data problems.

  4. Whitney Purdum
    August 9, 2017 at 07:05

    You are amazing. This is the best tutorial I've watched on Promises. Please keep doing what you're doing!

  5. Ainsley McGrath
    August 9, 2017 at 07:05

    hi I'm a new consultant self-learning JavaScript. can we see a video on error handling? and json/xml requests?

  6. Maximilian Meyer
    August 9, 2017 at 07:05

    What is on the image on the back wall? I see a TRex dragging a camper van.

  7. Maximilian Meyer
    August 9, 2017 at 07:05


  8. Hema M
    August 9, 2017 at 07:05

    Hey MPJ .Finally i understood what is promises .Thanks a lot .Could you please share more videos on promises .Jquery is not my first language but i have worked on jquery more than 5 years and i realized what i missed when i saw your all videos on java scripts and function programming.

  9. Daniel K.
    August 9, 2017 at 07:05

    Is the promise syntax in es6 the same?

  10. Sreekanth P
    August 9, 2017 at 07:05

    This is my first subscription of a YouTube channel of any kind. It's worth it.

  11. Lucas Caixeta
    August 9, 2017 at 07:05

    Hey @MPJ!
    As I talked once from twitter, I'm front end developer, from Brazil and now I'm living and working in Lisbon, Portugal. I'm Front End Developer and I'm having some fun with Reactjs and ES6. I came from legacy projects and for me JS was only to validate forms and do small things (hahah)… after start in this current job/project I realize that I had to learn more things, new features, know the power of JS … otherwise I will not be successful with react, you know.
    I start to learn ES6 with your videos and was great, now I know a lot of relevant things.
    Well, thanks to help-me (and others) sharing (with fun!) your knowledge.

    My best regards.

  12. Andrew Koliaka
    August 9, 2017 at 07:05

    More sneezing breaks!

  13. Evandro Terra
    August 9, 2017 at 07:05

    This is awesome, with this I resolve my problem!!!
    Thanks, thanks and thanks!!!

  14. remusomega
    August 9, 2017 at 07:05

    You sound like Peregrin Took (Pippin)

  15. mightyspaj
    August 9, 2017 at 07:05

    To answer your question: I'm a full-stack web developer. I do freelancing as a career and also work on business side-projects. I know JS fairly well, but I'm learning React ATM because it seems like the best thing to learn based on my research (so far I've just used jQuery)

  16. Arthur J
    August 9, 2017 at 07:05

    Sneeze time ? Wtf dude

  17. BenJammin Geiyer
    August 9, 2017 at 07:05

    Hello, in highschool 03-07 java, c++, css and html. Your videos have amplified my recent interest in functional programming. Have done some bootcamp prep with Flatiron and Viking school(free parts so far). So past two months, Ruby, SQL and Javascript(vanilla and react so far), I have a good handle. From Hackerrank, Code Academy, and Solo Learn also. A little Scala, but I like this approach more since JS is awesome. My goal is to get a developer position within 10 months, I have passion. Any tips on moving forward? @funfunfunction

  18. jonathan stoll
    August 9, 2017 at 07:05

    you are helping me get my dream job!!! thanks dude!!!

  19. michael connor
    August 9, 2017 at 07:05

    Great lesson. Do you have any idea why when i run the app (npm run develop)… a WordPress intall page opens at http://localhost:8000/wp-admin/install.php.. So weird.

  20. Orlen Perez
    August 9, 2017 at 07:05

    I've been reading through many websites, articules, and I watch you're videos to refresh knowledge and understand better what I read. Thank you very much

  21. Matthew Parker
    August 9, 2017 at 07:05

    "It would be zonkers." Haha, all my code is basically zonkers right now.

    I'm a Full-Stack JavaScript student at Code Fellows in Seattle, and I loved this video! It was really helpful! You've got a new subscriber.

  22. Daniel Toro
    August 9, 2017 at 07:05

    Yo MPJ! Could you please make a video covering async / await? Thanks man!! I've learnt tons from your videos, keep it up!

  23. PiIsRational
    August 9, 2017 at 07:05

    This series is great. Almost makes me want to dive deeper into JavaScript. I just have so many different things I want to learn – gotta focus. Anyways, awesome job on these.

  24. Ralex Hassle
    August 9, 2017 at 07:05

    why should I use let over var in ES6 ?

  25. Ice Age Ends (Vocaloid Post-Pop)
    August 9, 2017 at 07:05

    Admit it: that's the first time you are wearing that shirt, you just took it out of the package.

  26. JNG
    August 9, 2017 at 07:05

    He wet the wall with those sneezes

  27. Marco Angelo
    August 9, 2017 at 07:05

    great vid

  28. joe moorhouse
    August 9, 2017 at 07:05

    bootcamp graduate fluent in ruby and learning javascript after graduation

  29. Serg G
    August 9, 2017 at 07:05

    like for 'adventure time' 🙂

  30. Peter Griac
    August 9, 2017 at 07:05

    Hi MPJ,
    I am working as a young frontend developer, I know the basics of JS , jQuery and bit of BackboneJS. But I would like to write better and more professional code, and use the "cool" stuff 🙂 so I started watching every day at least one of your videos and they are really awesome and helpful, and also entertaining 🙂 keep up with the good work! thanks


  31. Chetan Gadhavi
    August 9, 2017 at 07:05

    Finally I got the concept of promise.
    great tysm👍👍👍

  32. Chris Schick
    August 9, 2017 at 07:05

    My favourite part is the special callback kitty.

Leave A Comment

You must be logged in to post a comment.