Skip to content

Instantly share code, notes, and snippets.

@nikcorg
Created April 25, 2013 05:22
Show Gist options
  • Save nikcorg/5457669 to your computer and use it in GitHub Desktop.
Save nikcorg/5457669 to your computer and use it in GitHub Desktop.
var a = Q.delay(100).thenResolve("a is done");
var b = Q.delay(110).thenResolve("b is done");
var c = Q.delay(120).thenResolve("c is doen");
Q.all([a, b, c]).spread(function (a, b, c) { console.log("all", a, b, c); });
a.then(function (a) { console.log("a only", a); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment