JSFiddle - React, Tailwind, and code Playground

by heriberto perez

HTML

<h1 class="title">hello</h1>

CSS

.title {
  color: green;
}

JavaScript

const arr = [10, 12, 15, 21];


for(var i=0; i<4; i++) {
  var waitingTime = (i + 1) * 1000;
  (function(bindedI){
    setTimeout(()=> P)
  })(i)
  setTimeout(()=>{
    console.log(arr[i]);
  }, waitingTime)
 }