var callApi1 = function(){ $("body").append("<h4>api 1 is now complete</h4>"); return $.ajax({url: "https://locahost:3000/api1"}); } var callApi2 = function(){ $("body").append("<h4>api 2 is now complete</h4>"); return $.ajax({url: "https://locahost:3000/api2"}); } var callApi3 = function(){ $("body").append("<h4>api 3 is now complete</h4>"); return $.ajax({url: "https://locahost:3000/api3"}); } callApi1().then(null,callApi2).then(null,callApi3);
<body/>