Skip to content

Instantly share code, notes, and snippets.

@ecompton3
Created May 26, 2016 16:34
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 ecompton3/584b2bd0e8054f39b0cd0fc84ac792ae to your computer and use it in GitHub Desktop.
Save ecompton3/584b2bd0e8054f39b0cd0fc84ac792ae to your computer and use it in GitHub Desktop.
'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