JSFiddle - React, Tailwind, and code Playground

JavaScript

for (var z = 0; z < 10; z++) {
    setTimeout(function() {
        console.log(z)
    }, 3000);
}