Last active
October 17, 2016 03:37
-
-
Save matthieu-D/04cc2b21c24cbd3050cbd6e83c52cb8e to your computer and use it in GitHub Desktop.
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
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