JSFiddle - React, Tailwind, and code Playground
JavaScript
document.write("first");
Promise.resolve(3).then(function () {
document.write("third");
}).then(function () {
document.write("fourth");
});
document.write("second");
document.write("first");
Promise.resolve(3).then(function () {
document.write("third");
}).then(function () {
document.write("fourth");
});
document.write("second");