JSFiddle - React, Tailwind, and code Playground

by José Villacreses

HTML

<div id='myDiv'/>

JavaScript

var p1 = new Promise((resolve, reject) => {
	reject('p1 error');
});
p1
.catch((err) => {
	throw (`decorated ${err}`);
})
.then((result) => {
	return(result + '; then 2');
})
.then((result) => {
	return(result + '; then 3')
})
.then((result) => {
	console.log('final result', result);
})
.catch((error) => {
	console.log('final error', error);
});