JSFiddle - React, Tailwind, and code Playground

by mendelthecoder

JavaScript

var i = 10;
function animate() {
    if (i > 1) {
        i -= 1;
        console.log(i);
        setTimeout(function() {
            animate(i);
        }, 500);
    }
}
animate();