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:
https://github.com/mpj/fpjs8
Much inspiration for this episode was drawn from this fantastic guide y mattdesl:
https://github.com/mattdesl/promise-cookbook#the-problem
Original source
32 responses to “Promises – Part 8 of Functional Programming in JavaScript”
Fantastic video, congratulations.
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 ๐
I'd like more Promises examples of pattern-based approaches to big data problems.
You are amazing. This is the best tutorial I've watched on Promises. Please keep doing what you're doing!
hi I'm a new consultant self-learning JavaScript. can we see a video on error handling? and json/xml requests?
What is on the image on the back wall? I see a TRex dragging a camper van.
NICE ONE!
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.
Is the promise syntax in es6 the same?
This is my first subscription of a YouTube channel of any kind. It's worth it.
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.
More sneezing breaks!
This is awesome, with this I resolve my problem!!!
Thanks, thanks and thanks!!!
You sound like Peregrin Took (Pippin)
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)
Sneeze time ? Wtf dude
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
you are helping me get my dream job!!! thanks dude!!!
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.
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
"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.
Yo MPJ! Could you please make a video covering async / await? Thanks man!! I've learnt tons from your videos, keep it up!
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.
why should I use let over var in ES6 ?
Admit it: that's the first time you are wearing that shirt, you just took it out of the package.
He wet the wall with those sneezes
great vid
bootcamp graduate fluent in ruby and learning javascript after graduation
like for 'adventure time' ๐
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
Peter
Finally I got the concept of promise.
great tysm๐๐๐
My favourite part is the special callback kitty.