Last active
January 10, 2016 05:24
-
-
Save famasya/708911c448ac96a9ccb9 to your computer and use it in GitHub Desktop.
[How to] Using promise ES 6
This file contains 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
new Promise(function(resolve,reject){ | |
[1,2,3,4].forEach(function(v){ | |
console.log(v); | |
resolve(); | |
}); | |
}).then(function(){ | |
console.log("done"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment