Einfaches Versprechen
getSomethingWithPromise()
.then(data => {/* do something with data */})
.catch(err => {/* handle the error */})
Helpless Hummingbird
getSomethingWithPromise()
.then(data => {/* do something with data */})
.catch(err => {/* handle the error */})
// jeffBuysCake is a promise
const promise = jeffBuysCake('black forest')