Permalink
Browse files

Update README.md

  • Loading branch information...
1 parent dca3b4f commit 3f7244da60ba03d38ae4f9134db4f97530dbf1f1 @artjock committed Mar 1, 2013
Showing with 3 additions and 13 deletions.
  1. +3 −13 README.md
View
16 README.md
@@ -28,19 +28,9 @@ Then:
pzero
.when([promise1, promise2])
- .then(function(results) {
- return {
- result1: results[0],
- result2: results[1]
- };
- })
- .then(function(data) {
- // 3
- return data.result1 + data.result2
- })
- .esle(function(results) {
- // rejected
- });
+ .then(function(results) { return { a: results[0], b: results[1] }; })
+ .then(function(data) { alert( data.a + data.b ); /* 3 */ })
+ .esle(function(results) { /* rejected */ });
promise1.resolve(1);
promise2.resolve(2);

0 comments on commit 3f7244d

Please sign in to comment.