promise.then(result => result * 2).then(result => result + 1)
Return in then can also be another promise.
It is like both map and switchMap in ReactiveX. The last then is also like subscribe in Rx.
someObservable
.map(result => result * 2)
.switchMap(mappedResult => AnotherObservable(mappedResult))
.subscribe(finalResult => {
// final logic
})thenNext: Promise error handling