Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Last active October 17, 2016 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/04cc2b21c24cbd3050cbd6e83c52cb8e to your computer and use it in GitHub Desktop.
Save matthieu-D/04cc2b21c24cbd3050cbd6e83c52cb8e to your computer and use it in GitHub Desktop.
var promise = new Promise((resolve, reject) =>{
resolve('success');
});
function handleSuccess (result) {
console.log('success', result);
}
function handleError (err) {
console.log('error', err);
}
promise.then( handleSuccess, handleError);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment