Created
June 23, 2014 15:33
-
-
Save yashprit/f4685d1037365b96f82c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo(){ | |
return Promise.all(["http://jsonplaceholder.typicode.com/posts/1", "http://jsonplaceholder.typicode.com/comments/1"]); | |
} | |
function task2(e){ | |
alert("In two got " + e); | |
return " Two "; | |
} | |
function task3(e){ | |
alert("In three got " + e); | |
return " Three "; | |
} | |
var p = foo(); | |
p.then(task2); | |
p.then(task3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment