JSFiddle - React, Tailwind, and code Playground

by TheDiamondDoge

JavaScript

(function () {
 
  console.log('this is the start'); // 
 
  Promise.resolve(console.log('promise 1')) // 
 
  setTimeout(function cb1() { // 
    console.log('timeout 0');
  }, 2000);

  setTimeout(function cb() { // 
    console.log('timeout 1');
  });
 
  console.log('this is just a message'); // 

  setTimeout(function cb1() { // 
    console.log('timeout 2');
  }, 0);

  new Promise((res, rj) => res('promise 2')).then(console.log); // 
  
  console.log('this is the end?'); // 
 
})();