Promise -fication of JS calls.
It was to give JS method a callback function. This splitting code and making a lot of possibilities for error to come out in this place.
One would write old times according to MDN:
And now it is made with Promise pattern like so:
In general and briefly this now helps to avoid 'callback hell' with functions passed as arguments and write asynchronous code a sort of in synchronous manner.
This all becomes extra useful upon one having need to load set of data from a different sources. E.g. via several API cals to different url's and react accordingly.
Hail to ES6!