Countdown time pomoc

pozdrav svima dali je ovo ikako moguce da radi bez html samo js probo sam ovo ubacit document.write("<div id=\"counter\"><\/div>"); ali neradi

<div id="counter"></div>
<script>
function countdown() {
    var seconds = 61;
    function tick() {
        var counter = document.getElementById("counter");
        seconds--;
        counter.innerHTML = "0:" + (seconds < 10 ? "0" : "") + String(seconds);
        if( seconds > 0 ) {
            setTimeout(tick, 1000);
        } else {
            alert("Game over");
        }
    }
    tick();
}

countdown();
</script>

Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey