Promises – Part 8 of Functional Programming in JavaScript



💖 Support the show by becoming a Patreon
https://www.patreon.com/funfunfunction

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

source

Reply

Do NOT follow this link or you will be banned from the site!