const myPromise = new Promise((resolve, reject) => {
  setTimeout(() => { resolve('success!!!'); }, 2000);
});

myPromise.then(
  result => { console.log(result) },
  failMessage => { console.log(failMessage) }
).finally(finallyMessage => { console.log('FINALLY!!')});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.