let contador = 0;
// Correção: "function" com 't' e abertura de chaves '{' corrigida
function atualizarContador(callback) {
contador++;
callback(contador);
// Correção: "setTimeout" com 't' e 'T' maiúsculo, e "function" com 't'
setTimeout(function () {
atualizarContador(callback);
}, 5000);
}
function mostrarContador(valor) {
console.log("Contador: " + valor);
}
// Inicia o ciclo
atualizarContador(mostrarContador);
To embed this project on your website, copy the following code and paste it into your website's HTML: