-2
How I create a 1 second interval in the execution of the for
or of function
?
JavaScript:
function Linha1() {
for (var i1 = 0; i1 <= 3; i1++, Linha1.setInterval(1000)) {
if (notas1[0][i1] == 1) {
C_Teclado.play();
} else if (notas1[i1][0] == 2) {
CS_Teclado.play();
} else if (notas1[i1][0] == 3) {
D_Teclado.play();
} else if (notas1[i1][0] == 4) {
_Teclado.play();
} else if (notas1[i1][0] == 5) {
E_Teclado.play();
} else {
SomVazio.play();
}
}
}
The problem is that I would like to 'delay' the interval between the for executions and not the Function execution
– Vinícius Crisol