A promise then callback can either return a value (to resolves the promise), or a another promise that will resolve/reject the promise. The latter's what's happening here. Whatever the returned promise will resolve/reject is the result of the whole.