JSFiddle - React, Tailwind, and code Playground
by Phil Brown
JavaScript
async function fail() {
throw new Error('I failed')
}
fail()
.then(res => alert(`Success: ${res}`))
.catch(err => alert(`Error: ${err}`))
by Phil Brown
async function fail() {
throw new Error('I failed')
}
fail()
.then(res => alert(`Success: ${res}`))
.catch(err => alert(`Error: ${err}`))