JSFiddle - React, Tailwind, and code Playground

by Adam Mendoza

HTML

<div id="count"></div>

JavaScript

function countdown() {
    // your code here
    var count = 10;
    return setInterval(function() {
        $( "#count" ).text( count-- );

        if(count == 0) {
            // your code goes here
            count = 10;
        }
    }, 1000);
}

var interval = countdown();