1
It is possible to pass the millisecond parameter in the function setInteval
as a variable so that it can be changed dynamically or necessarily needs to be a static number?
I did some tests but did not succeed and I did not find any concrete information in a brief research I did...
The idea of example would be in a game, conditioning the score the higher the faster the function performs increasing the difficulty.
let mostrarBaloes = setInterval(criarBaloes, tempo);
Time starts with 1000, but when the score reach 100, time becomes 900, score 200 time 800, etc.
Is it possible or am I mistaken in something?