JSFiddle - React, Tailwind, and code Playground

by Walter Rumsby

HTML

<!DOCTYPE html>
<html>
    <body>
        <div id="foo"></div>
    </body>
</html>

JavaScript

var foo = 0,
    
    bah = function() {
        document.getElementById('foo').innerHTML = (foo++);
        
        if (foo < 6) {
            window.setTimeout(bah, 100);
        }
    };

bah();