Created
January 26, 2016 04:46
-
-
Save mgiuffrida/275571bae1e95a825c7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// option 1: | |
myPromise.then( | |
function(result) { | |
// do stuff | |
}, function(error) { | |
// oh noes | |
}) | |
.then( | |
function(result) { | |
// continue doing stuff | |
}, function(error) { | |
// we is doomed | |
}); | |
// option 2: | |
myPromise.then(function(result) { | |
// do stuff | |
}, function(error) { | |
// oh noes | |
}).then(function(result) { | |
// continue doing stuff | |
}, function(error) { | |
// we is doomed | |
}); | |
// clang-format | |
myPromise.then( | |
function(result) { | |
// do stuff | |
}, | |
function(error) { | |
// oh noes | |
}) | |
.then( | |
function(result) { | |
// continue doing stuff | |
}, | |
function(error) { | |
// we is doomed | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment