Skip to content

Instantly share code, notes, and snippets.

@joelcox
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save joelcox/e7cbd9bbc41f6112f65a to your computer and use it in GitHub Desktop.

Select an option

Save joelcox/e7cbd9bbc41f6112f65a to your computer and use it in GitHub Desktop.

Revisions

  1. joelcox renamed this gist Feb 19, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. joelcox created this gist Feb 19, 2015.
    8 changes: 8 additions & 0 deletions promise.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    promise.then(function(response) {
    console.log(response);
    return promise;
    }).then(function(anotherResponse) {
    console.log(anotherResponse);
    }).catch(function(error) {
    console.error(error);
    });