Created
May 26, 2016 16:34
-
-
Save ecompton3/584b2bd0e8054f39b0cd0fc84ac792ae 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
'use strict' | |
let promiseChain = () => { | |
return new Promise(function(resolve, reject) { | |
resolve(1); | |
}).then((val) => { | |
return new Promise(function(resolve, reject) { | |
resolve(2); | |
}); | |
}) | |
} | |
promiseChain().then((val => { | |
console.log(`Promise Map Output: ${val}`); | |
})).catch((err) => { | |
console.log(`Error Output: ${err}`); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment