JSFiddle - React, Tailwind, and code Playground

JavaScript

for (let i = 1; i <= 5; i++) {
  setTimeout(function () {
    console.log(i)
  }, i)
}