2
I’m doing a football game simulation, and I need a function to count the time to 45;
What I did worked out, but it’s very fast, I wanted to be able to control the speed, for example, speed 1 counts slowly, speed 2 faster and so on.
I did it with loop:
var tempo = 0;
function TempoDeJogo() {
while (tempo < 45) {
tempo++;
console.log(tempo);
}
console.log("Fim de Jogo");
}
TempoDeJogo();
Only the one I did, the count to 45 is practically instantaneous, I want to be able to adjust that speed.
It worked right, thanks!
– Leandro Teraoka