Skip to content

Instantly share code, notes, and snippets.

@famasya
Last active January 10, 2016 05:24
Show Gist options
  • Save famasya/708911c448ac96a9ccb9 to your computer and use it in GitHub Desktop.
Save famasya/708911c448ac96a9ccb9 to your computer and use it in GitHub Desktop.
[How to] Using promise ES 6
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