Javascript Promises are not difficult. However, lots of people find it a little bit hard to understand at the beginning. Therefore, I would like to write down the way I understand promise, in a dummy way.
A Promise in short:
“Imagine you are a kid. Your mom promises you that she’ll get you a new phone next week.”
You don’t know if you will get that phone until next week. Your mom can either really buy you a brand new phone, or stand you up and withhold the phone if she is not happy :(.
That is a promise. A promise has 3 states. They are:
Full article available in my Scotch:
JavaScript Promises for Dummies_Get to know JavaScript Promises better. Javascript Promises are not difficult. However, lots of people find it a little…_scotch.io