step1().then( function step2(resultFromStep1) { // ... } ).then( function step3(resultFromStep2) { // ... } ).then( function step4(resultFromStep3) { // ... } );