JSFiddle - React, Tailwind, and code Playground

by Richard Hunter

JavaScript

const promise = new Promise((resolve, reject) => {
  resolve('richard is great');
});

setTimeout(() => {
  promise.then((val) => {
    console.log(val);
  });
}, 1000);