JSFiddle - React, Tailwind, and code Playground

JavaScript

console.clear()

new Promise((resolve, reject) => {
  setTimeout(() => {
    throw new Error(3)
  }, 1000);
})
.finally(() => {
  console.log('finally')
})
.then(result => {
  console.log('then', result)
})
.catch(err => {
  console.log('catch', err)
})