This is based on my understanding of Promise, feel free to correct me if you think there's something wrong with my explanation :P
Now imagine yourself running an errand for your mom while she's out working. She told you two things:
- Clean the house
- Buy pizza for dinner
Your typical approach would be cleaning the house for whole day, afterwards go out of the house to buy some pizza. This process would take much time as you have to walk out of the house, wait in line just to get yourself some of that tasty pizza.
A better way we could have done it is, call a pizza guy, and tell him to have the pizza delivered at certain time, and clean the house afterwards.
What does it have to do with promise? You have executed the pizza task without have to wait for it, then you go clean the house, after some time, the pizza may have arrived at same time you have finished cleaning the house.
TL;DR: Promise is (as far as I understand it) executing whatever process you have but without having to wait for an actually result.
A social network for devs?
Level up every day