Skip to content

Instantly share code, notes, and snippets.

@seanstrom
Created January 20, 2015 19:24
Show Gist options
  • Save seanstrom/186fc9ba4063e252e142 to your computer and use it in GitHub Desktop.
Save seanstrom/186fc9ba4063e252e142 to your computer and use it in GitHub Desktop.
Async JS/Node - Sequential Promises Example - Part 2
// Part 2
var username = 'seanghagstrom'
findLikesForPostsByUsername(username)
.then(function(totalLikes) {
console.log(username + ' total number of likes: ' + totalLikes)
})
.catch(function(err) {
console.error(err)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment