JSFiddle - React, Tailwind, and code Playground

by Rick Hedin

JavaScript

function dog() {
  console.log('Dog has started')
  cat().then(function () {
    console.log('In Dog. Cat has finished')
  })
  console.log('Dog has finished')
}

function cat() {
  var promise = new Promise( (resolve, reject) => {
    resolve();
  });
  return promise;
}

dog();