Skip to content

Instantly share code, notes, and snippets.

@laser
Created November 26, 2013 19:13
Show Gist options
  • Save laser/7664264 to your computer and use it in GitHub Desktop.
Save laser/7664264 to your computer and use it in GitHub Desktop.
ES6 Generators
setTimeout(function(){
_get("/something.ajax?greeting", function(err, greeting) {
if (err) { console.log(err); throw err; }
_get("/else.ajax?who&greeting="+greeting, function(err, who) {
if (err) { console.log(err); throw err; }
console.log(greeting+" "+who);
});
});
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment