JSFiddle - React, Tailwind, and code Playground

by sandro_paganotti

JavaScript

var timer = {
    contatore: 10,
    conta: function(){
        console.log(timer.contatore);
        timer.contatore--;
        if(time.contatore > 0){                
         setTimeout(timer.conta,1000);
    } 
}
timer.conta();