Skip to content

Instantly share code, notes, and snippets.

@joelcox
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelcox/e7cbd9bbc41f6112f65a to your computer and use it in GitHub Desktop.
Save joelcox/e7cbd9bbc41f6112f65a to your computer and use it in GitHub Desktop.
Chained promises
promise.then(function(response) {
console.log(response);
return promise;
}).then(function(anotherResponse) {
console.log(anotherResponse);
}).catch(function(error) {
console.error(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment