JSFiddle - React, Tailwind, and code Playground

by Abdul Ahmad

JavaScript

function async() {
	return new Promise((res, rej) => {
  	rej('no');
  });
}

async().then(res => { 
	console.log(res);
}).catch(console.error);