Skip to content

Instantly share code, notes, and snippets.

@Peeja
Created April 1, 2013 12:30
Show Gist options
  • Save Peeja/5284697 to your computer and use it in GitHub Desktop.
Save Peeja/5284697 to your computer and use it in GitHub Desktop.
var ids = [...];
rottenTweets;
_(ids).each(function(id) {
getTweet(id, function(tweetBody) {
rot13(tweetBody, function(rottenTweet) {
rottenTweets.push(rottenTweet);
if (rottenTweets.length == ids.length) {
useRottenTweets();
}
});
});
});
function useRottenTweets() {
console.log(rottenTweets);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment