What's the difference between returning value or Promise.resolve from then()
What is the difference between: new Promise(function(res, rej) { res("aaa"); }) .then(function(result) { return "bbb"; }) .then(function(result) { console.log(result); }); and this: new Promise(function(res, rej) { res("aaa"); }) .then(function(result) { return Promise.resolve("bbb"); }) .then(function(result) { console.log(result); }); I'm asking as I'm getting different behaviour Using Angular and $http service with chaining .then(). A bit too much code hence first the example above. Hrishi The rule is, if the function that is in the then handler returns a value, the promise resolves/rejects