Skip to content

Instantly share code, notes, and snippets.

@chinmay185
Last active August 29, 2015 14:18
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 chinmay185/869c9c8990ab56aba641 to your computer and use it in GitHub Desktop.
Save chinmay185/869c9c8990ab56aba641 to your computer and use it in GitHub Desktop.
Writing promises in callback style (ugly)
getUser("tom").then(function(user) {
getTweets(user).then(function(tweets) {
updateTimeline(tweets)
.then(function() {
console.log("done");
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment